예제 #1
0
def do_show(cs, args):
    info = dict()
    migration = utils.find_migration(cs, args.migration)

    info.update(migration._info)
    info['properties'] = _dict_to_string(info['properties'])

    utils.print_dict(info)
예제 #2
0
def do_delete(cs, args):
    """Removes one or more Migrations."""
    failure_count = 0
    for migration in args.migration:
        try:
            m = utils.find_migration(cs, migration)
            m.delete()
            print("Request to delete Migration %s has been "
                  "accepted." % migration)
        except Exception as e:
            failure_count += 1
            print("Delete migration %s failed: %s" % (migration, e))
    if failure_count == len(args.migration):
        raise exceptions.CommandError("Unable to delete any of the specified "
                                      "Migrations.")