Esempio n. 1
0
    def get_gateways(self, tenant_id, filters):
        gws = self.nuagegw.get_gateways(tenant_id, filters)
        gw_list = []
        for gw in gws:
            ret = gw_helper.make_gateway_dict(gw)
            gw_list.append(ret)

        return gw_list
Esempio n. 2
0
 def get_gateway(self, tenant_id, gw_id):
     try:
         resp = gw_helper.get_gateway(self.restproxy, gw_id)
         return gw_helper.make_gateway_dict(resp)
     except Exception as e:
         if e.code == constants.RES_NOT_FOUND:
             return []
         raise