def ListFlavors(self, isDetail = False): """Returns a list of flavors""" if isDetail: method = "/flavors/detail" else: method = "/flavors" flavors = self.rsClient.SendRequest(rType = "GET", method = method, data = None, params = None) flavorsList = [] for flavor in simplejson.loads(flavors['body'])['flavors']: fl = RawMapper(flavor) flavorsList.append(fl.getObject()) return flavorsList
def testCoreDeletion(self): rm = RawMapper(self.sampleObject) rm.clearProperty('d') o = rm.getObject() assert not hasattr(o, 'd')
def __init__(self, srv): RawMapper.__init__(self, srv) self.customMapper('state', "self.mapState()") self.clearProperty('status') self.clearProperty('progress')