Пример #1
0
def main(opts, args):
    auth = AuthStack()
    print "From:", auth.from_auth_ip, " Username:"******" Project:", auth.from_tenant_name
    print "To:  ", auth.to_auth_ip, " Username:"******" Project:", auth.to_tenant_name

    if opts.report:
        try:
            keystone_common.print_projects('from')
        except Exception, e:
            print "To print project info, switch to admin user"
        try:
            keystone_common.print_projects('to')
        except Exception, e:
            print "To print project info, switch to admin user"
Пример #2
0
def main(opts, args):
    auth = AuthStack()
    print "From:", auth.from_auth_ip, " Username:"******" Project:", auth.from_tenant_name
    print "To:  ", auth.to_auth_ip, " Username:"******" Project:", auth.to_tenant_name

    if opts.report:
        try:
            keystone_common.print_projects('from')
        except Exception, e:
            print "To print project info, switch to admin user"
        try:
            keystone_common.print_projects('to')
        except Exception, e:
            print "To print project info, switch to admin user"
Пример #3
0
def main(opts, args):
    auth = AuthStack()
    print "From:", auth.from_auth_ip, " Username:"******" Project:", auth.from_tenant_name
    print "To:  ", auth.to_auth_ip, " Username:"******" Project:", auth.to_tenant_name

    if opts.fromusers:
        print "\n--------------- From Users: ------------------------"
        keystone_common.print_user_names('from')
    if opts.tousers:
        print "\n--------------- To Users: ------------------------"
        keystone_common.print_user_names('to')
    if opts.fromprojects:
        keystone_common.print_projects('from')
    if opts.toprojects:
        keystone_common.print_projects('to')
Пример #4
0
def main(opts, args):
    auth = AuthStack()
    print "From:", auth.from_auth_ip, " Username:"******" Project:", auth.from_tenant_name
    print "To:  ", auth.to_auth_ip, " Username:"******" Project:", auth.to_tenant_name

    if opts.fromusers:
        print "\n--------------- From Users: ------------------------"
        keystone_common.print_user_names('from')
    if opts.tousers:
        print "\n--------------- To Users: ------------------------"
        keystone_common.print_user_names('to')
    if opts.fromprojects:
        keystone_common.print_projects('from')
    if opts.toprojects:
        keystone_common.print_projects('to')
Пример #5
0
         print "Please provide download directory and file with image UUIDs to be uploaded, " \
               "for example, ./downloads/ ./id_file"
 if opts.flavors:
     nova_common.compare_and_create_flavors()
 #todo: fix this
 if opts.singlevolumeimagecreate:
     if args:
         # print args[0]
         cinder_common.upload_single_volumes_to_image('from',
                                                      uuid_file=args[0])
     else:
         print "Please provide file with volume UUIDs, for example, ./id_volume_file"
 if opts.quota:
     nova_common.compare_and_report_quotas()
 if opts.projects:
     print keystone_common.print_projects('from')
     print keystone_common.print_projects('to')
 if opts.createprojects:
     keystone_common.compare_and_create_projects()
 if opts.publickeys:
     nova_common.compare_and_create_keypairs()
 if opts.users:
     if args:
         keystone_common.compare_and_create_users_by_project(
             password=args[0])
     else:
         keystone_common.compare_and_create_users_by_project()
 if opts.shutdown:
     if args:
         # print args[0]
         nova_common.power_off_vms('from', id_file=args[0])
Пример #6
0
     else:
         print "Please provide download directory and file with image UUIDs to be uploaded, " \
               "for example, ./downloads/ ./id_file"
 if opts.flavors:
     nova_common.compare_and_create_flavors()
 #todo: fix this
 if opts.singlevolumeimagecreate:
     if args:
         # print args[0]
         cinder_common.upload_single_volumes_to_image('from', uuid_file=args[0])
     else:
         print "Please provide file with volume UUIDs, for example, ./id_volume_file"
 if opts.quota:
     nova_common.compare_and_report_quotas()
 if opts.projects:
     print keystone_common.print_projects('from')
     print keystone_common.print_projects('to')
 if opts.createprojects:
     keystone_common.compare_and_create_projects()
 if opts.publickeys:
     nova_common.compare_and_create_keypairs()
 if opts.users:
     if args:
         keystone_common.compare_and_create_users_by_project(password = args[0])
     else:
         keystone_common.compare_and_create_users_by_project()
 if opts.shutdown:
     if args:
         # print args[0]
         nova_common.power_off_vms('from', id_file=args[0])
     else: