@@ -219,12 +219,12 @@ The examples below are only a small fraction of the existing API so please refer
219219``` java
220220// Create a User associated to the new Project
221221User user = os. identity(). users(). create(Builders . user()
222- .domainId(" domain id" )
223- .name(" foobar" )
224- .password(" secret" )
225- 226- .enabled(true )
227- .build());
222+ .domainId(" domain id" )
223+ .name(" foobar" )
224+ .password(" secret" )
225+ 226+ .enabled(true )
227+ .build());
228228// or
229229User user
= os
. identity()
. users()
. create(
" domain id" ,
" foobar" ,
" secret" ,
" [email protected] " ,
true );
230230
@@ -257,11 +257,11 @@ os.identity().roles().getByName("role name);
257257```java
258258// Create a project
259259os.identity().project().create(Builders.project()
260- .name(" project name" )
261- .description(" project description" )
262- .domainId(" project domain id" )
263- .enabled(true)
264- .build());
260+ .name(" project name" )
261+ .description(" project description" )
262+ .domainId(" project domain id" )
263+ .enabled(true)
264+ .build());
265265```
266266
267267#### Identity Operations (Keystone) V2
@@ -385,11 +385,10 @@ InputStream is = os.images().getAsStream("imageId");
385385// (URL Payload in this example, File, InputStream are other payloads available)
386386Image image = os.images().create(Builders.image()
387387 .name(" Cirros 0.3 . 0 x64" )
388- .isPublic(true)
389- .containerFormat(ContainerFormat.BARE)
390- .diskFormat(DiskFormat.QCOW2)
391- .build()
392- ), Payloads.create(new URL(" https: // launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img")));
388+ .isPublic(true)
389+ .containerFormat(ContainerFormat.BARE)
390+ .diskFormat(DiskFormat.QCOW2)
391+ .build()), Payloads.create(new URL(" https: // launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img")));
393392```
394393
395394License
0 commit comments