20b2f1f0c0
Move the docs around a little to allow the new templated docs.o.o site link to things like the user and install guides in the expected location. Change-Id: I7f3b625c04aa6cd2a7ebe5f2ce4a398cf464b1cc Signed-off-by: Doug Hellmann <doug@doughellmann.com>
24 lines
671 B
Python
24 lines
671 B
Python
import shade
|
|
shade.simple_logging(debug=True)
|
|
|
|
cloud = shade.openstack_cloud(cloud='my-citycloud', region_name='Buf1')
|
|
try:
|
|
server = cloud.create_server(
|
|
'my-server', image='Ubuntu 16.04 Xenial Xerus',
|
|
flavor=dict(id='0dab10b5-42a2-438e-be7b-505741a7ffcc'),
|
|
wait=True, auto_ip=True)
|
|
|
|
print("\n\nFull Server\n\n")
|
|
cloud.pprint(server)
|
|
|
|
print("\n\nTurn Detailed Off\n\n")
|
|
cloud.pprint(cloud.get_server('my-server', detailed=False))
|
|
|
|
print("\n\nBare Server\n\n")
|
|
cloud.pprint(cloud.get_server('my-server', bare=True))
|
|
|
|
finally:
|
|
# Delete it - this is a demo
|
|
cloud.delete_server(server, wait=True, delete_ips=True)
|
|
|