@@ -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
200200User 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
208208User 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
238238os.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)
365365Image 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
374373License
0 commit comments