comments, changed to use default domain, var for project net
This commit is contained in:
		@@ -1,13 +1,22 @@
 | 
				
			|||||||
import getpass
 | 
					import getpass
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libcloud.security
 | 
					 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
from libcloud.compute.providers import get_driver
 | 
					from libcloud.compute.providers import get_driver
 | 
				
			||||||
from libcloud.compute.types import Provider
 | 
					from libcloud.compute.types import Provider
 | 
				
			||||||
 | 
					
 | 
				
			||||||
auth_url = 'https://192.168.72.40:5000'
 | 
					# Please use 1-25 for X in username, project etc., as coordinated in the lab sessions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# web service endpoint of the private cloud infrastructure
 | 
				
			||||||
 | 
					auth_url = 'https://private-cloud2.informatik.hs-fulda.de:5000'
 | 
				
			||||||
 | 
					# your username in OpenStack
 | 
				
			||||||
 | 
					auth_username = 'CloudCompX'
 | 
				
			||||||
 | 
					# your project in OpenStack
 | 
				
			||||||
 | 
					project_name = 'CloudCompGrpX'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# default region
 | 
				
			||||||
region_name = 'RegionOne'
 | 
					region_name = 'RegionOne'
 | 
				
			||||||
domain_name = "hsfulda"
 | 
					# domain to use, "default" for local accounts, "hsfulda" for LDAP of DVZ, e.g., using fdaiXXXX as auth_username
 | 
				
			||||||
 | 
					domain_name = "default"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ubuntu_image_name = "Ubuntu 14.04 - Trusty Tahr - 64-bit - Cloud Based Image"
 | 
					ubuntu_image_name = "Ubuntu 14.04 - Trusty Tahr - 64-bit - Cloud Based Image"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -26,20 +35,11 @@ def main():
 | 
				
			|||||||
    #
 | 
					    #
 | 
				
			||||||
    ###########################################################################
 | 
					    ###########################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if "OS_PROJECT_NAME" in os.environ:
 | 
					 | 
				
			||||||
        project_name = os.environ["OS_PROJECT_NAME"]
 | 
					 | 
				
			||||||
    else:
 | 
					 | 
				
			||||||
        project_name = input("Enter your OpenStack project:")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if "OS_USERNAME" in os.environ:
 | 
					 | 
				
			||||||
        auth_username = os.environ["OS_USERNAME"]
 | 
					 | 
				
			||||||
    else:
 | 
					 | 
				
			||||||
        auth_username = input("Enter your OpenStack username:")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if "OS_PASSWORD" in os.environ:
 | 
					    if "OS_PASSWORD" in os.environ:
 | 
				
			||||||
        auth_password = os.environ["OS_PASSWORD"]
 | 
					        auth_password = os.environ["OS_PASSWORD"]
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        auth_password = getpass.getpass("Enter your OpenStack password:")
 | 
					        auth_password = getpass.getpass("Enter your OpenStack password:")
 | 
				
			||||||
 | 
					    # auth_password = "demo"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ###########################################################################
 | 
					    ###########################################################################
 | 
				
			||||||
    #
 | 
					    #
 | 
				
			||||||
@@ -47,8 +47,6 @@ def main():
 | 
				
			|||||||
    #
 | 
					    #
 | 
				
			||||||
    ###########################################################################
 | 
					    ###########################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    libcloud.security.VERIFY_SSL_CERT = False
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    provider = get_driver(Provider.OPENSTACK)
 | 
					    provider = get_driver(Provider.OPENSTACK)
 | 
				
			||||||
    conn = provider(auth_username,
 | 
					    conn = provider(auth_username,
 | 
				
			||||||
                    auth_password,
 | 
					                    auth_password,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,6 @@
 | 
				
			|||||||
import getpass
 | 
					import getpass
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libcloud.security
 | 
					 | 
				
			||||||
from libcloud.compute.providers import get_driver
 | 
					from libcloud.compute.providers import get_driver
 | 
				
			||||||
from libcloud.compute.types import Provider
 | 
					from libcloud.compute.types import Provider
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -9,10 +8,19 @@ from libcloud.compute.types import Provider
 | 
				
			|||||||
#   services: nova, glance, neutron
 | 
					#   services: nova, glance, neutron
 | 
				
			||||||
#   resources: 2 instances, 2 floating ips (1 keypair, 2 security groups)
 | 
					#   resources: 2 instances, 2 floating ips (1 keypair, 2 security groups)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# HS-Fulda Private Cloud
 | 
					# Please use 1-25 for X in username, project etc., as coordinated in the lab sessions
 | 
				
			||||||
auth_url = 'https://192.168.72.40:5000'
 | 
					
 | 
				
			||||||
 | 
					# web service endpoint of the private cloud infrastructure
 | 
				
			||||||
 | 
					auth_url = 'https://private-cloud2.informatik.hs-fulda.de:5000'
 | 
				
			||||||
 | 
					# your username in OpenStack
 | 
				
			||||||
 | 
					auth_username = 'CloudCompX'
 | 
				
			||||||
 | 
					# your project in OpenStack
 | 
				
			||||||
 | 
					project_name = 'CloudCompGrpX'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# default region
 | 
				
			||||||
region_name = 'RegionOne'
 | 
					region_name = 'RegionOne'
 | 
				
			||||||
domain_name = "hsfulda"
 | 
					# domain to use, "default" for local accounts, "hsfulda" for LDAP of DVZ, e.g., using fdaiXXXX as auth_username
 | 
				
			||||||
 | 
					domain_name = "default"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ubuntu_image_name = "Ubuntu 14.04 - Trusty Tahr - 64-bit - Cloud Based Image"
 | 
					ubuntu_image_name = "Ubuntu 14.04 - Trusty Tahr - 64-bit - Cloud Based Image"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -31,16 +39,6 @@ def main():
 | 
				
			|||||||
    #
 | 
					    #
 | 
				
			||||||
    ###########################################################################
 | 
					    ###########################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if "OS_PROJECT_NAME" in os.environ:
 | 
					 | 
				
			||||||
        project_name = os.environ["OS_PROJECT_NAME"]
 | 
					 | 
				
			||||||
    else:
 | 
					 | 
				
			||||||
        project_name = input("Enter your OpenStack project:")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if "OS_USERNAME" in os.environ:
 | 
					 | 
				
			||||||
        auth_username = os.environ["OS_USERNAME"]
 | 
					 | 
				
			||||||
    else:
 | 
					 | 
				
			||||||
        auth_username = input("Enter your OpenStack username:")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if "OS_PASSWORD" in os.environ:
 | 
					    if "OS_PASSWORD" in os.environ:
 | 
				
			||||||
        auth_password = os.environ["OS_PASSWORD"]
 | 
					        auth_password = os.environ["OS_PASSWORD"]
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
@@ -52,8 +50,6 @@ def main():
 | 
				
			|||||||
    #
 | 
					    #
 | 
				
			||||||
    ###########################################################################
 | 
					    ###########################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    libcloud.security.VERIFY_SSL_CERT = False
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    provider = get_driver(Provider.OPENSTACK)
 | 
					    provider = get_driver(Provider.OPENSTACK)
 | 
				
			||||||
    conn = provider(auth_username,
 | 
					    conn = provider(auth_username,
 | 
				
			||||||
                    auth_password,
 | 
					                    auth_password,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,10 +10,19 @@ from libcloud.compute.types import Provider
 | 
				
			|||||||
#   services: nova, glance, neutron
 | 
					#   services: nova, glance, neutron
 | 
				
			||||||
#   resources: 2 instances (m1.small), 2 floating ips (1 keypair, 2 security groups)
 | 
					#   resources: 2 instances (m1.small), 2 floating ips (1 keypair, 2 security groups)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# HS-Fulda Private Cloud
 | 
					# Please use 1-25 for X in username, project etc., as coordinated in the lab sessions
 | 
				
			||||||
auth_url = 'https://192.168.72.40:5000'
 | 
					
 | 
				
			||||||
 | 
					# web service endpoint of the private cloud infrastructure
 | 
				
			||||||
 | 
					auth_url = 'https://private-cloud2.informatik.hs-fulda.de:5000'
 | 
				
			||||||
 | 
					# your username in OpenStack
 | 
				
			||||||
 | 
					auth_username = 'CloudCompX'
 | 
				
			||||||
 | 
					# your project in OpenStack
 | 
				
			||||||
 | 
					project_name = 'CloudCompGrpX'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# default region
 | 
				
			||||||
region_name = 'RegionOne'
 | 
					region_name = 'RegionOne'
 | 
				
			||||||
domain_name = "hsfulda"
 | 
					# domain to use, "default" for local accounts, "hsfulda" for LDAP of DVZ, e.g., using fdaiXXXX as auth_username
 | 
				
			||||||
 | 
					domain_name = "default"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ubuntu_image_name = "Ubuntu 14.04 - Trusty Tahr - 64-bit - Cloud Based Image"
 | 
					ubuntu_image_name = "Ubuntu 14.04 - Trusty Tahr - 64-bit - Cloud Based Image"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -32,16 +41,6 @@ def main():
 | 
				
			|||||||
    #
 | 
					    #
 | 
				
			||||||
    ###########################################################################
 | 
					    ###########################################################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if "OS_PROJECT_NAME" in os.environ:
 | 
					 | 
				
			||||||
        project_name = os.environ["OS_PROJECT_NAME"]
 | 
					 | 
				
			||||||
    else:
 | 
					 | 
				
			||||||
        project_name = input("Enter your OpenStack project:")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if "OS_USERNAME" in os.environ:
 | 
					 | 
				
			||||||
        auth_username = os.environ["OS_USERNAME"]
 | 
					 | 
				
			||||||
    else:
 | 
					 | 
				
			||||||
        auth_username = input("Enter your OpenStack username:")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    if "OS_PASSWORD" in os.environ:
 | 
					    if "OS_PASSWORD" in os.environ:
 | 
				
			||||||
        auth_password = os.environ["OS_PASSWORD"]
 | 
					        auth_password = os.environ["OS_PASSWORD"]
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user