Skip to content

Commit

Permalink
Merge pull request ContainX#1286 from 17862953931/17862953931-patch-1
Browse files Browse the repository at this point in the history
Update README.md
  • Loading branch information
olivergondza committed Dec 16, 2019
2 parents 83225a2 + 3005439 commit 212098b
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,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("[email protected]")
.enabled(true)
.build());
.domainId("domain id")
.name("foobar")
.password("secret")
.email("[email protected]")
.enabled(true)
.build());
//or
User user = os.identity().users().create("domain id", "foobar", "secret", "[email protected]", true);

Expand Down Expand Up @@ -236,11 +236,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 @@ -364,11 +364,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

0 comments on commit 212098b

Please sign in to comment.