def main(argv):
    os.environ["LANG"] = "en_US.UTF8"
    options = parse_args(argv)
    utils.log_init(options.debug)

    clean_all()
    image = upload_image_to_glance(sess)
    create_instance_in_nova(sess, image)
def main(argv):
    os.environ["LANG"] = "en_US.UTF8"
    options = parse_args(argv)
    utils.log_init(options.debug)

    clean_all()
    image = upload_image_to_glance(sess)
    create_instance_in_nova(sess, image)
Beispiel #3
0
import sys
import time

possible_topdir = os.path.normpath(
    os.path.join(os.path.abspath(sys.argv[0]), os.pardir, os.pardir))
if os.path.exists(os.path.join(possible_topdir, "lib", "__init__.py")):
    sys.path.insert(0, os.path.join(possible_topdir))
current_dir = os.path.normpath(
    os.path.join(os.path.abspath(sys.argv[0]), os.pardir))

from keystoneclient.auth.identity import v2
from keystoneclient import session
from neutronclient.neutron import client as neutronclient

from lib import utils
utils.log_init(True)

# keystone
auth_url = "http://192.168.56.102:5000/v2.0/"
username = "******"
password = "******"
tenant_name = "demo"

# network
public_network_name = "public"

app_network = "app_network"
app_network_cidr = "20.0.0.0/24"

db_network = "db_network"
db_network_cidr = "30.0.0.0/24"
Beispiel #4
0
import sys
import time

possible_topdir = os.path.normpath(os.path.join(
        os.path.abspath(sys.argv[0]), os.pardir, os.pardir))
if os.path.exists(os.path.join(possible_topdir, "lib", "__init__.py")):
        sys.path.insert(0, os.path.join(possible_topdir))
current_dir = os.path.normpath(os.path.join(
        os.path.abspath(sys.argv[0]), os.pardir))

import glanceclient as glanceclient
from keystoneclient.auth.identity import v2
from keystoneclient import session

from lib import utils
utils.log_init(False)

# keystone
auth_url = "http://192.168.56.102:5000/v2.0/"
username = "******"
password = "******"
tenant_name = "demo"

# glance
image_name = "Ubuntu 12.04 64bit"
image_filename = "ubuntu_server_12.04_x64.qcow2"
image_path = os.path.join(current_dir, "images", image_filename)

# connects
auth = v2.Password(auth_url=auth_url,
                   username=username,
Beispiel #5
0
#!/usr/bin/env python

import os
import sys

possible_topdir = os.path.normpath(os.path.join(
        os.path.abspath(sys.argv[0]), os.pardir, os.pardir))
if os.path.exists(os.path.join(possible_topdir, "lib", "__init__.py")):
        sys.path.insert(0, os.path.join(possible_topdir))
current_dir = os.path.normpath(os.path.join(
        os.path.abspath(sys.argv[0]), os.pardir))

import logging

from lib import utils

debug = False
utils.log_init(debug)

logging.debug("this is a debug message")
logging.info("this is a info message")
logging.warning("this is a warning message")
logging.error("this is a error message")
import sys
import time

possible_topdir = os.path.normpath(os.path.join(
        os.path.abspath(sys.argv[0]), os.pardir, os.pardir))
if os.path.exists(os.path.join(possible_topdir, "lib", "__init__.py")):
        sys.path.insert(0, os.path.join(possible_topdir))
current_dir = os.path.normpath(os.path.join(
        os.path.abspath(sys.argv[0]), os.pardir))

from keystoneclient.auth.identity import v2
from keystoneclient import session
from neutronclient.neutron import client as neutronclient

from lib import utils
utils.log_init(True)

# keystone
auth_url = "http://192.168.56.102:5000/v2.0/"
username = "******"
password = "******"
tenant_name = "demo"

# network
public_network_name = "public"

app_network = "app_network"
app_network_cidr = "20.0.0.0/24"

db_network = "db_network"
db_network_cidr = "30.0.0.0/24"