Example #1
0
    def __init__(self, osurl=None, osuser=None, ospassword=None):

        wlan0_ip = ifconfig.get_interface_dict()['wlan0']
        self.url = osurl or wlan0_ip
        self.osuser = osuser or "demo"
        self.ospassword = ospassword or "nova"
        self.tenant_id = None
        self.default_header = {"Content-Type": "application/json"}
        
        # All hosts
        self.keystone_host = self.url + ":5000"
        self.keystone_admin_host = self.url + ':35357'
        self.cinder_host = self.url + ":8776"

        # All functions called
        self.tenant_id = self.get_tenant_id_for_user()
        self.token = self.get_token()
Example #2
0
import ifconfig
import boto.ec2

wlan0_ip = ifconfig.get_interface_dict()['wlan0']

region = boto.ec2.regioninfo.RegionInfo(name="nova", endpoint=wlan0_ip)


conn = boto.connect_ec2(aws_access_key_id="0d1ccb7b274f4c22849c2cbbfef7579e",
                                aws_secret_access_key="f3163ec60aeb4e7aada9d4ada5114846",
                                is_secure=False,
                                region=region,
                                port=8773,
                                path="/services/Cloud")