Exemplo n.º 1
0
def show_unused_resources(config_path,
                          cloud,
                          count=100,
                          tenant=None,
                          debug=False):
    cfg = config.load(load_yaml_config(config_path, debug))
    stage.execute_stage('cloudferrylib.os.discovery.stages.DiscoverStage', cfg)
    procedures.show_largest_unused_resources(int(count), cloud, tenant)
Exemplo n.º 2
0
def discover(config_path, debug=False):
    """
        :config_name - name of config yaml-file, example 'config.yaml'
    """
    cfg = config.load(load_yaml_config(config_path, debug))
    stage.execute_stage('cloudferrylib.os.discovery.stages.DiscoverStage',
                        cfg,
                        force=True)
Exemplo n.º 3
0
def estimate_migration(config_path, migration, debug=False):
    cfg = config.load(load_yaml_config(config_path, debug))
    if migration not in cfg.migrations:
        print "No such migration:", migration
        print "\nPlease choose one of this:"
        for name in sorted(cfg.migrations.keys()):
            print "  -", name
        return -1

    stage.execute_stage("cloudferrylib.os.discovery.stages.DiscoverStage", cfg)
    procedures.estimate_copy(cfg, migration)
    procedures.show_largest_servers(cfg, 10, migration)
Exemplo n.º 4
0
def estimate_migration(config_path, migration, debug=False):
    cfg = config.load(load_yaml_config(config_path, debug))
    if migration not in cfg.migrations:
        print 'No such migration:', migration
        print '\nPlease choose one of this:'
        for name in sorted(cfg.migrations.keys()):
            print '  -', name
        return -1

    stage.execute_stage('cloudferrylib.os.discovery.stages.DiscoverStage', cfg)
    procedures.estimate_copy(cfg, migration)
    procedures.show_largest_servers(cfg, 10, migration)
Exemplo n.º 5
0
def show_unused_resources(config_path, cloud, count=100, tenant=None, debug=False):
    cfg = config.load(load_yaml_config(config_path, debug))
    stage.execute_stage("cloudferrylib.os.discovery.stages.DiscoverStage", cfg)
    procedures.show_largest_unused_resources(int(count), cloud, tenant)
Exemplo n.º 6
0
def discover(config_path, debug=False):
    """
        :config_name - name of config yaml-file, example 'config.yaml'
    """
    cfg = config.load(load_yaml_config(config_path, debug))
    stage.execute_stage("cloudferrylib.os.discovery.stages.DiscoverStage", cfg, force=True)