def get_credentials(args): if args.rc_file_host and args.rc_file_path: creds = read_rc_file(args.rc_file_host, args.rc_file_path) else: username = args.username tenant_name = args.tenant_name auth_url = args.auth_url password = args.password creds = {"username": username, "tenant_name": tenant_name, "auth_url": auth_url, "password": password} return creds
def get_credentials(args): if args.rc_file_host and args.rc_file_path: creds = read_rc_file(args.rc_file_host, args.rc_file_path) else: username = args.username tenant_name = args.tenant_name auth_url = args.auth_url password = args.password creds = { "username": username, "tenant_name": tenant_name, "auth_url": auth_url, "password": password } return creds
dest = "root@{}:/etc/nova/nova.conf".format(cmpt) res = scp(src, dest) # TODO: Add the NUMATopologyFilter to the default_scheduler_filter list nova_conf = get_nova_conf(host) lines = get_cfg("scheduler_default_filters", nova_conf) lines_ = list(filter(lambda l: l.comment is None, lines)) if not lines_: glob_logger.error("Unable to get") # restart nova pci.openstack_service(cmpt, "restart", "nova") # Setup example creds = read_rc_file(args.server, "/root/keystonerc_admin") # Now, we create a PCI flavor and attempt to boot numa = NUMA(**creds) flv = numa.create_flavor("pci_small", ram=512, vcpus=1) pci_pass_flv = numa.create_pci_flavor(alias_name, flv=flv) glob_logger.info(str(pci_pass_flv.get_keys())) guest = numa.boot_instance(flv=pci_pass_flv, name="pci-testing") instance = numa.discover(guests=[guest])[0] # TODO verify the instance is actually using xmldump = instance.dumpxml() dump = untangle.parse(xmldump)
else: # FIXME: Handle multiple controllers controller = opts.node.split(",")[0] if opts.ignores: ignores = opts.ignores.split(",") else: if opts.partial: raise UpgradeException("--partial was true but no --ignores given") ignores = [] # TODO: unregister subscription-manager, install rhos-release, run rhos-release 6 # TODO: what about subscription-manager for GA'ed releases? # TODO: configure_rhos_repos(controllers, version=opts.version) creds = read_rc_file(controller, "/root/keystonerc_admin") base = BaseStack(**creds) # Keystone first # ku = KeystoneUpgrade([controller]) # Then swift su = SwiftUpgrade([controller]) # Then cinder cu = CinderUpgrade([controller]) # Then glance gu = GlanceUpgrade([controller]) # Then heat