Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #1286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,12 @@ The examples below are only a small fraction of the existing API so please refer
```java
// Create a User associated to the new Project
User user = os.identity().users().create(Builders.user()
.domainId("domain id")
.name("foobar")
.password("secret")
.email("foobar@example.com")
.enabled(true)
.build());
.domainId("domain id")
.name("foobar")
.password("secret")
.email("foobar@example.com")
.enabled(true)
.build());
//or
User user = os.identity().users().create("domain id", "foobar", "secret", "foobar@example.org", true);

Expand Down Expand Up @@ -257,11 +257,11 @@ os.identity().roles().getByName("role name);
```java
// Create a project
os.identity().project().create(Builders.project()
.name("project name")
.description("project description")
.domainId("project domain id")
.enabled(true)
.build());
.name("project name")
.description("project description")
.domainId("project domain id")
.enabled(true)
.build());
```

#### Identity Operations (Keystone) V2
Expand Down Expand Up @@ -385,11 +385,10 @@ InputStream is = os.images().getAsStream("imageId");
// (URL Payload in this example, File, InputStream are other payloads available)
Image image = os.images().create(Builders.image()
.name("Cirros 0.3.0 x64")
.isPublic(true)
.containerFormat(ContainerFormat.BARE)
.diskFormat(DiskFormat.QCOW2)
.build()
), Payloads.create(new URL("https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img")));
.isPublic(true)
.containerFormat(ContainerFormat.BARE)
.diskFormat(DiskFormat.QCOW2)
.build()), Payloads.create(new URL("https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img")));
```

License
Expand Down