
This sucks in the git history for both projects, then moves their files in place. It should not introduce any behavior changes to any of the existing openstacksdk code, nor to openstack.config and openstack.cloud - other than the name change. TODO(shade) comments have been left indicating places where further integration work should be done. It should not be assumed that these are the final places for either to live. This is just about getting them in-tree so we can work with them. The enforcer code for reasons surpassing understanding does not work with python setup.py build_sphinx but it does work with sphinx-build (what?) For now turn it off. We can turn it back on once the build sphinx job is migrated to the new PTI. Change-Id: I9523e4e281285360c61e9e0456a8e07b7ac1243c
23 lines
910 B
Python
23 lines
910 B
Python
import openstack.cloud
|
|
|
|
# Initialize and turn on debug logging
|
|
openstack.cloud.simple_logging(debug=True)
|
|
|
|
for cloud_name, region_name, image, flavor_id in [
|
|
('my-vexxhost', 'ca-ymq-1', 'Ubuntu 16.04.1 LTS [2017-03-03]',
|
|
'5cf64088-893b-46b5-9bb1-ee020277635d'),
|
|
('my-citycloud', 'Buf1', 'Ubuntu 16.04 Xenial Xerus',
|
|
'0dab10b5-42a2-438e-be7b-505741a7ffcc'),
|
|
('my-internap', 'ams01', 'Ubuntu 16.04 LTS (Xenial Xerus)',
|
|
'A1.4')]:
|
|
# Initialize cloud
|
|
cloud = openstack.openstack_cloud(cloud=cloud_name, region_name=region_name)
|
|
|
|
# Boot a server, wait for it to boot, and then do whatever is needed
|
|
# to get a public ip for it.
|
|
server = cloud.create_server(
|
|
'my-server', image=image, flavor=dict(id=flavor_id),
|
|
wait=True, auto_ip=True)
|
|
# Delete it - this is a demo
|
|
cloud.delete_server(server, wait=True, delete_ips=True)
|