def main(): args = parse_args() environment._configure_logging(args) try: environment._ensure() client = clients.get_nova_bm_client() flavors.cleanup_flavors(client) root_disk = os.environ.get('ROOT_DISK', None) if args.nodes: with open(args.nodes, 'r') as nodes_file: nodes_list = json.load(nodes_file) flavors.create_flavors_from_nodes(client, nodes_list, args.kernel, args.ramdisk, root_disk) elif args.flavors: with open(args.flavors, 'r') as flavors_file: flavors_list = json.load(flavors_file) flavors.create_flavors_from_list(client, flavors_list, args.kernel, args.ramdisk) elif args.ironic: ironic_client = clients.get_ironic_client() flavors.create_flavors_from_ironic(client, ironic_client, args.kernel, args.ramdisk, root_disk) except Exception: logging.exception("Unexpected error during command execution") return 1 return 0
def main(): args = parse_args() environment._configure_logging(args) try: environment._ensure() client = clients.get_nova_bm_client() flavors.cleanup_flavors(client) root_disk = os.environ.get('ROOT_DISK', None) if args.nodes: with open(args.nodes, 'r') as nodes_file: nodes_list = json.load(nodes_file) flavors.create_flavors_from_nodes( client, nodes_list, args.kernel, args.ramdisk, root_disk) elif args.flavors: with open(args.flavors, 'r') as flavors_file: flavors_list = json.load(flavors_file) flavors.create_flavors_from_list( client, flavors_list, args.kernel, args.ramdisk) elif args.ironic: ironic_client = clients.get_ironic_client() flavors.create_flavors_from_ironic( client, ironic_client, args.kernel, args.ramdisk, root_disk) except Exception: logging.exception("Unexpected error during command execution") return 1 return 0
def main(): args = parse_args() environment._configure_logging(args) try: with open(args.nodes, 'r') as node_file: nodes_list = json.load(node_file) environment._ensure() keystone_client = _clients.get_keystone_client() glance_client = _clients.get_glance_client() client = _clients.get_ironic_client() nodes.register_all_nodes(args.service_host, nodes_list, client=client, remove=args.remove, blocking=True, keystone_client=keystone_client, glance_client=glance_client, kernel_name=args.kernel_name, ramdisk_name=args.ramdisk_name) except Exception: logging.exception("Unexpected error during command execution") return 1 return 0
def main(): args = parse_args() environment._configure_logging(args) initialize(args.host, args.admin_token, args.admin_email, args.admin_password, args.region, args.ssl, args.public, args.user, args.timeout, args.pollinterval)
def main(): args = parse_args() environment._configure_logging(args) initialize(args.host, args.admin_token, args.admin_email, args.admin_password, args.region, args.ssl, args.public, args.user, args.timeout, args.pollinterval)
def main(): args = parse_args() environment._configure_logging(args) if args.heatenv: keystone_pki.generate_certs_into_json(args.heatenv, args.seed) else: keystone_pki.create_and_write_ca_and_signing_pairs(args.directory)
def main(): args = parse_args() environment._configure_logging(args) if args.heatenv: keystone_pki.generate_certs_into_json(args.heatenv, args.seed) else: keystone_pki.create_and_write_ca_and_signing_pairs(args.directory)
def main(): args = parse_args() environment._configure_logging(args) if args.pkisetup and not args.user: print("User is required if PKI setup will be performed.") return 1 initialize(args.host, args.admin_token, args.admin_email, args.admin_password, args.region, args.ssl, args.public, args.user, args.timeout, args.pollinterval, args.pkisetup)
def main(): args = parse_args() environment._configure_logging(args) if args.pkisetup and not args.user: print("User is required if PKI setup will be performed.") return 1 initialize(args.host, args.admin_token, args.admin_email, args.admin_password, args.region, args.ssl, args.public, args.user, args.timeout, args.pollinterval, args.pkisetup)
def main(): args = parse_args() environment._configure_logging(args) try: environment._ensure() keystone_client = clients.get_keystone_v3_client() initialize_for_heat(keystone_client, args.domain_admin_password) except Exception: logging.exception("Unexpected error during command execution") return 1 return 0
def main(): args = parse_args() environment._configure_logging(args) try: environment._ensure() keystone_client = clients.get_keystone_v3_client() initialize_for_heat(keystone_client, args.domain_admin_password) except Exception: logging.exception("Unexpected error during command execution") return 1 return 0
def main(): args = parse_args() environment._configure_logging(args) try: environment._ensure() client = clients.get_glance_client() glance.create_or_find_kernel_and_ramdisk( client, args.kernel, args.ramdisk, kernel_path=args.kernel_file, ramdisk_path=args.ramdisk_file) except Exception: logging.exception("Unexpected error during command execution") return 1 return 0
def main(): args = parse_args() environment._configure_logging(args) try: environment._ensure() with open(args.json, 'r') as jsonfile: network_desc = json.load(jsonfile) neutron_client = _clients.get_neutron_client() keystone_client = _clients.get_keystone_client() neutron.initialize_neutron(network_desc, neutron_client=neutron_client, keystone_client=keystone_client) except Exception: logging.exception("Unexpected error during command execution") return 1 return 0
def main(stdout=None): args = parse_args() environment._configure_logging(args) if os.path.isfile(args.services): with open(args.services, 'r') as service_file: services = simplejson.load(service_file) else: # we assume it's just JSON string services = simplejson.loads(args.services) client = _clients.get_keystone_client() keystone.setup_endpoints(services, public_host=args.public_host, region=args.region, os_auth_url=os.environ["OS_AUTH_URL"], client=client)
def main(stdout=None): args = parse_args() environment._configure_logging(args) if os.path.isfile(args.services): with open(args.services, 'r') as service_file: services = simplejson.load(service_file) else: # we assume it's just JSON string services = simplejson.loads(args.services) client = _clients.get_keystone_client() keystone.setup_endpoints( services, public_host=args.public_host, region=args.region, os_auth_url=os.environ["OS_AUTH_URL"], client=client)
def main(): args = parse_args() environment._configure_logging(args) try: with open(args.nodes, 'r') as node_file: nodes_list = json.load(node_file) environment._ensure() keystone_client = _clients.get_keystone_client() if nodes.using_ironic(keystone=keystone_client): client = _clients.get_ironic_client() else: client = _clients.get_nova_bm_client() nodes.register_all_nodes( args.service_host, nodes_list, client=client, remove=args.remove) except Exception: logging.exception("Unexpected error during command execution") return 1 return 0
def main(): args = parse_args() environment._configure_logging(args) try: with open(args.nodes, 'r') as node_file: nodes_list = json.load(node_file) environment._ensure() keystone_client = _clients.get_keystone_client() glance_client = _clients.get_glance_client() client = _clients.get_ironic_client() nodes.register_all_nodes( args.service_host, nodes_list, client=client, remove=args.remove, blocking=True, keystone_client=keystone_client, glance_client=glance_client, kernel_name=args.kernel_name, ramdisk_name=args.ramdisk_name) except Exception: logging.exception("Unexpected error during command execution") return 1 return 0
def main(): args = parse_args() environment._configure_logging(args) try: with open(args.nodes, 'r') as node_file: nodes_list = json.load(node_file) environment._ensure() keystone_client = _clients.get_keystone_client() if nodes.using_ironic(keystone=keystone_client): client = _clients.get_ironic_client() else: client = _clients.get_nova_bm_client() nodes.register_all_nodes(args.service_host, nodes_list, client=client, remove=args.remove) except Exception: logging.exception("Unexpected error during command execution") return 1 return 0