Fix image uploader tool
This commit is contained in:
parent
d4ee017cde
commit
1d455b3eb7
|
@ -285,7 +285,7 @@ system auto-generate one for you you will need to check the final output
|
|||
of the above install and pick up the password that was generated which
|
||||
should be displayed at key ``passwords/horizon_keystone_admin``. You can
|
||||
also later find this authentication information in the generated
|
||||
``os-core.rc`` file.
|
||||
``core.rc`` file.
|
||||
|
||||
If you see a login page and can access horizon then:
|
||||
|
||||
|
@ -298,7 +298,7 @@ In your ANVIL directory:
|
|||
|
||||
::
|
||||
|
||||
source os-core.rc
|
||||
source core.rc
|
||||
|
||||
This should set up the environment variables you need to run OpenStack
|
||||
CLI tools:
|
||||
|
|
|
@ -27,22 +27,17 @@ from anvil.components import glance
|
|||
from anvil.helpers import uploader
|
||||
|
||||
|
||||
class CfgProxy:
|
||||
def __init__(self, cfg, pw_gen):
|
||||
self.cfg = cfg
|
||||
self.pw_gen = pw_gen
|
||||
|
||||
|
||||
def get_config():
|
||||
base_config = cfg.IgnoreMissingConfigParser()
|
||||
config_location = cfg_helpers.find_config()
|
||||
if config_location:
|
||||
base_config.read([config_location])
|
||||
|
||||
config = cfg.ProxyConfig()
|
||||
config.add_read_resolver(cfg.EnvResolver())
|
||||
config.add_read_resolver(cfg.ConfigResolver(base_config))
|
||||
pw_gen = passwords.PasswordGenerator(config)
|
||||
return (config, pw_gen)
|
||||
config.add_read_resolver(cfg.ConfigResolver(cfg.IgnoreMissingConfigParser(fns=cfg_helpers.find_config())))
|
||||
|
||||
config.add_password_resolver(passwords.ConfigPassword(config))
|
||||
config.add_password_resolver(passwords.InputPassword(config))
|
||||
config.add_password_resolver(passwords.RandomPassword(config))
|
||||
|
||||
return config
|
||||
|
||||
|
||||
def setup_logging(level):
|
||||
|
@ -74,5 +69,6 @@ if __name__ == "__main__":
|
|||
cleaned_uris.append(uri)
|
||||
|
||||
setup_logging(len(options.verbosity))
|
||||
cfg, pw_gen = get_config()
|
||||
uploader.Service(cfg, pw_gen).install(uris)
|
||||
utils.welcome(prog_name="Image uploader tool")
|
||||
cfg = get_config()
|
||||
uploader.Service(cfg).install(uris)
|
||||
|
|
Loading…
Reference in New Issue