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'])
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')