def update_network(self, context, id, network): flavor = meta_db_v2.get_flavor_by_network(context.session, id) plugin = self._get_plugin(flavor) with context.session.begin(subtransactions=True): net = plugin.update_network(context, id, network) if not self._is_l3_plugin(plugin): self._process_l3_update(context, net, network['network']) return net
def get_network(self, context, id, fields=None): flavor = meta_db_v2.get_flavor_by_network(context.session, id) plugin = self._get_plugin(flavor) net = plugin.get_network(context, id, fields) net['id'] = id if not fields or ext_flavor.FLAVOR_NETWORK in fields: self._extend_network_dict(context, net) if fields and 'id' not in fields: del net['id'] return net
def get_network(self, context, id, fields=None): flavor = meta_db_v2.get_flavor_by_network(context.session, id) plugin = self._get_plugin(flavor) net = plugin.get_network(context, id, fields) net['id'] = id if not fields or FLAVOR_NETWORK in fields: self._extend_network_dict(context, net) if fields and 'id' not in fields: del net['id'] return net
def _get_flavor_by_network_id(self, context, network_id): return meta_db_v2.get_flavor_by_network(context.session, network_id)
def delete_network(self, context, id): flavor = meta_db_v2.get_flavor_by_network(context.session, id) plugin = self._get_plugin(flavor) return plugin.delete_network(context, id)
def _get_flavor_by_network_id(self, context, network_id): return meta_db_v2.get_flavor_by_network(context.session, network_id)
def delete_network(self, context, id): flavor = meta_db_v2.get_flavor_by_network(context.session, id) plugin = self._get_plugin(flavor) return plugin.delete_network(context, id)