@@ -0,0 +1,1474 @@
+import os%0Aimport time%0Afrom keystoneclient.v2_0 import client as kclient%0Afrom novaclient.v1_1 import client as nclient%0A%0Afrom glanceclient import client as gclient%0A%0A# Fetch credentials%0A%0AOS_USERNAME = os.environ%5B'OS_USERNAME'%5D%0AOS_PASSWORD = os.environ%5B'OS_PASSWORD'%5D%0AOS_TENANT_NAME = os.environ%5B'OS_TENANT_NAME'%5D%0AOS_AUTH_URL = os.environ%5B'OS_AUTH_URL'%5D%0A%0A# Initialize clients%0A%0Anova_client = nclient.Client(OS_USERNAME,%0A                             OS_PASSWORD,%0A                             OS_TENANT_NAME,%0A                             OS_AUTH_URL)%0A%0Akeystone_client = kclient.Client(username=OS_USERNAME,%0A                                 password=OS_PASSWORD,%0A                                 tenant_name=OS_TENANT_NAME,%0A                                 auth_url=OS_AUTH_URL)%0A%0Akeystone_client.authenticate()%0A%0AOS_AUTH_TOKEN = keystone_client.auth_token%0AOS_IMAGE_ENDPOINT = keystone_client.service_catalog.url_for(%0A    service_type='image',%0A    endpoint_type='publicURL')%0A%0Aglance_client = gclient.Client('1', endpoint=OS_IMAGE_ENDPOINT,%0A                               token=OS_AUTH_TOKEN)%0A%0Aimages = glance_client.images.list()%0A%0A# Create image%0A%0Aimage_prefix = 'ubuntu'%0Aflavor_small = nova_client.flavors.list()%5B1%5D%0A%0Afor image in images:%0A    if image.name.startswith(image_prefix):%0A        image_id = image.id%0A        break%0A%0Anova_client.servers.create(name='ubuntu_small_' + str(time.time()),%0A                           image=image_id,%0A                           flavor=flavor_small)%0A

Add VM creation script