def modify_fields_from_db(cls, db_obj): result = super(RouterExtraAttributes, cls).modify_fields_from_db(db_obj) if az_ext.AZ_HINTS in result: result[az_ext.AZ_HINTS] = (az_ext.convert_az_string_to_list( result[az_ext.AZ_HINTS])) return result
def modify_fields_from_db(cls, db_obj): result = super(RouterExtraAttributes, cls).modify_fields_from_db( db_obj) if az_ext.AZ_HINTS in result: result[az_ext.AZ_HINTS] = ( az_ext.convert_az_string_to_list(result[az_ext.AZ_HINTS])) return result
def _extend_extra_router_dict(self, router_res, router_db): super(RouterAvailabilityZoneMixin, self)._extend_extra_router_dict( router_res, router_db) if not utils.is_extension_supported(self, 'router_availability_zone'): return router_res[az_ext.AZ_HINTS] = az_ext.convert_az_string_to_list( router_res[az_ext.AZ_HINTS]) router_res['availability_zones'] = ( self.get_router_availability_zones(router_db))
def _extend_extra_router_dict(self, router_res, router_db): super(RouterAvailabilityZoneMixin, self)._extend_extra_router_dict(router_res, router_db) if not utils.is_extension_supported(self, 'router_availability_zone'): return router_res[az_ext.AZ_HINTS] = az_ext.convert_az_string_to_list( router_res[az_ext.AZ_HINTS]) router_res['availability_zones'] = ( self.get_router_availability_zones(router_db))
def _extend_availability_zone(net_res, net_db): net_res[az_ext.AZ_HINTS] = az_ext.convert_az_string_to_list( net_db[az_ext.AZ_HINTS]) plugin = directory.get_plugin() net_res[az_ext.AVAILABILITY_ZONES] = ( plugin.get_network_availability_zones(net_db))
def _extend_availability_zone(self, net_res, net_db): net_res[az_ext.AZ_HINTS] = az_ext.convert_az_string_to_list( net_db[az_ext.AZ_HINTS]) net_res[az_ext.AVAILABILITY_ZONES] = ( self.get_network_availability_zones(net_db['id']))
def _extend_availability_zone(self, net_res, net_db): net_res[az_ext.AZ_HINTS] = az_ext.convert_az_string_to_list( net_db[az_ext.AZ_HINTS]) net_res[az_ext.AVAILABILITY_ZONES] = ( self.get_network_availability_zones(net_db))