@utils.arg('--flavor', metavar='<flavor>', help=_('Filter results by flavor name or ID.'))
@utils.arg('--tenant', metavar='<tenant_id>', help=_('Filter results by tenant ID.'), action=shell.DeprecatedAction, real_action='nothing', use=_('this option is not supported, and will be removed in version 5.0.0.'))
def do_flavor_access_list(cs, args):
 if args.flavor:
  flavor = _find_flavor(cs, args.flavor)
  if flavor.is_public:
   raise exceptions.CommandError(_('Access list not available for public flavors.'))
  kwargs = {'flavor': flavor}
 else:
  raise exceptions.CommandError(_('Unable to get all access lists. Specify --flavor'))
 try:
  access_list = cs.flavor_access.list(**kwargs)
 except NotImplementedError as e:
  raise exceptions.CommandError(('%s' % str(e)))
 columns = ['Flavor_ID', 'Tenant_ID']
 utils.print_list(access_list, columns)

@ utils . arg ( '--flavor' , metavar = '<flavor>' , help = _ ( 'Filter results by flavor name or ID.' ) ) @ utils . arg ( '--tenant' , metavar = '<tenant_id>' , help = _ ( 'Filter results by tenant ID.' ) , action = shell . DeprecatedAction , real_action = 'nothing' , use = _ ( 'this option is not supported, and will be removed in version 5.0.0.' ) ) def do_flavor_access_list ( cs , args ) : if args . flavor : flavor = _find_flavor ( cs , args . flavor ) if flavor . is_public : raise exceptions . CommandError ( _ ( 'Access list not available for public flavors.' ) ) kwargs = { 'flavor' : flavor } else : raise exceptions . CommandError ( _ ( 'Unable to get all access lists. Specify --flavor' ) ) try : access_list = cs . flavor_access . list ( ** kwargs ) except NotImplementedError as e : raise exceptions . CommandError ( ( '%s' % str ( e ) ) ) columns = [ 'Flavor_ID' , 'Tenant_ID' ] utils . print_list ( access_list , columns )
print access information about the given flavor .