Exemplo n.º 1
0
 def on_flavor(self, args):
     self.top._get_nova()
     if len(args) < 2:
         print "need more args for flavor"
         return
     utils.show_object(self.top.nc.flavors, args[1], [
                 'id', 'name', 'disk', 'ram', 'swap', 'vcpus'])
Exemplo n.º 2
0
 def on_role(self, args):
     if len(args) < 2:
         print "no role specified"
         return
     try:
         utils.show_object(self.top.kc.roles, args[1],
                 ['id', 'name'])
     except kc_exceptions.NotFound:
         # Most likely this is not authorized
         raise exceptions.NotAuthorized(None, 'show role')