Skip to content

Commit 212098b

Browse files
committed
Merge pull request ContainX#1286 from 17862953931/17862953931-patch-1
Update README.md
2 parents 83225a2 + 3005439 commit 212098b

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

README.md

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,12 @@ The examples below are only a small fraction of the existing API so please refer
198198
```java
199199
// Create a User associated to the new Project
200200
User user = os.identity().users().create(Builders.user()
201-
.domainId("domain id")
202-
.name("foobar")
203-
.password("secret")
204-
205-
.enabled(true)
206-
.build());
201+
.domainId("domain id")
202+
.name("foobar")
203+
.password("secret")
204+
205+
.enabled(true)
206+
.build());
207207
//or
208208
User user = os.identity().users().create("domain id", "foobar", "secret", "[email protected]", true);
209209

@@ -236,11 +236,11 @@ os.identity().roles().getByName("role name);
236236
```java
237237
// Create a project
238238
os.identity().project().create(Builders.project()
239-
.name("project name")
240-
.description("project description")
241-
.domainId("project domain id")
242-
.enabled(true)
243-
.build());
239+
.name("project name")
240+
.description("project description")
241+
.domainId("project domain id")
242+
.enabled(true)
243+
.build());
244244
```
245245
246246
#### Identity Operations (Keystone) V2
@@ -364,11 +364,10 @@ InputStream is = os.images().getAsStream("imageId");
364364
// (URL Payload in this example, File, InputStream are other payloads available)
365365
Image image = os.images().create(Builders.image()
366366
.name("Cirros 0.3.0 x64")
367-
.isPublic(true)
368-
.containerFormat(ContainerFormat.BARE)
369-
.diskFormat(DiskFormat.QCOW2)
370-
.build()
371-
), Payloads.create(new URL("https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img")));
367+
.isPublic(true)
368+
.containerFormat(ContainerFormat.BARE)
369+
.diskFormat(DiskFormat.QCOW2)
370+
.build()), Payloads.create(new URL("https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img")));
372371
```
373372

374373
License

0 commit comments

Comments
 (0)