本文整理汇总了Python中neutron.extensions.providernet._raise_if_updates_provider_attributes函数的典型用法代码示例。如果您正苦于以下问题:Python _raise_if_updates_provider_attributes函数的具体用法?Python _raise_if_updates_provider_attributes怎么用?Python _raise_if_updates_provider_attributes使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_raise_if_updates_provider_attributes函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: update_network
def update_network(self, context, network_id, network):
pnet._raise_if_updates_provider_attributes(network['network'])
with context.session.begin(subtransactions=True):
result = super(DFPlugin, self).update_network(context, network_id,
network)
self._process_l3_update(context, result, network['network'])
return result
开发者ID:th3architect,项目名称:dragonflow,代码行数:7,代码来源:plugin.py
示例2: update_network
def update_network(self, context, network_id, network):
pnet._raise_if_updates_provider_attributes(network["network"])
# FIXME(arosen) - rollback...
if "name" in network["network"]:
self._set_network_name(network_id, network["network"]["name"])
with context.session.begin(subtransactions=True):
return super(OVNPlugin, self).update_network(context, network_id, network)
开发者ID:vdham,项目名称:networking-ovn,代码行数:7,代码来源:plugin.py
示例3: update_network
def update_network(self, context, network_id, network):
pnet._raise_if_updates_provider_attributes(network["network"])
# TODO(gsagie) rollback needed
if "name" in network["network"]:
self._set_network_name(network_id, network["network"]["name"])
with context.session.begin(subtransactions=True):
return super(DFPlugin, self).update_network(context, network_id, network)
开发者ID:morganwang010,项目名称:dragonflow,代码行数:7,代码来源:plugin.py
示例4: update_network
def update_network(self, context, id, network):
"""Update network.
Perform this operation in the context of the configured device
plugins.
Note that the Nexus sub-plugin does not need to be notified
(and the Nexus switch does not need to be [re]configured)
for an update network operation because the Nexus sub-plugin
is agnostic of all network-level attributes except the
segmentation ID. Furthermore, updating of the segmentation ID
is not supported by the OVS plugin since it is considered a
provider attribute, so it is not supported by this method.
"""
LOG.debug(_("update_network() called"))
# We can only support updating of provider attributes if all the
# configured sub-plugins support it. Currently we have no method
# in place for checking whether a sub-plugin supports it,
# so assume not.
provider._raise_if_updates_provider_attributes(network['network'])
args = [context, id, network]
return self._invoke_plugin_per_device(const.VSWITCH_PLUGIN,
self._func_name(),
args)
开发者ID:AsherBond,项目名称:quantum,代码行数:26,代码来源:virt_phy_sw_v2.py
示例5: update_network
def update_network(self, context, id, network):
provider._raise_if_updates_provider_attributes(network['network'])
session = context.session
with session.begin(subtransactions=True):
net = super(LinuxBridgePluginV2, self).update_network(context, id,
network)
self._process_l3_update(context, net, network['network'])
self._extend_network_dict_provider(context, net)
return net
开发者ID:kavonm,项目名称:neutron,代码行数:10,代码来源:lb_neutron_plugin.py
示例6: update_network
def update_network(self, context, network_id, network):
pnet._raise_if_updates_provider_attributes(network['network'])
# TODO(gsagie) rollback needed
with context.session.begin(subtransactions=True):
result = super(DFPlugin, self).update_network(context, network_id,
network)
self._process_l3_update(context, result, network['network'])
if 'name' in network['network']:
self._set_network_name(network_id, network['network']['name'])
return result
开发者ID:yangstack,项目名称:dragonflow,代码行数:10,代码来源:plugin.py
示例7: update_network
def update_network(self, context, id, network):
"""Update network.
Perform this operation in the context of the configured device
plugins.
"""
LOG.debug(_("update_network() called"))
# We can only support updating of provider attributes if all the
# configured sub-plugins support it. Currently we have no method
# in place for checking whether a sub-plugin supports it,
# so assume not.
provider._raise_if_updates_provider_attributes(network['network'])
args = [context, id, network]
return self._invoke_plugin_per_device(const.VSWITCH_PLUGIN,
self._func_name(),
args)
开发者ID:li-ma,项目名称:neutron,代码行数:18,代码来源:virt_phy_sw_v2.py
示例8: update_network
def update_network(self, context, id, network):
provider._raise_if_updates_provider_attributes(network["network"])
session = context.session
with session.begin(subtransactions=True):
original_network = super(Ml2Plugin, self).get_network(context, id)
updated_network = super(Ml2Plugin, self).update_network(context, id, network)
self._process_l3_update(context, updated_network, network["network"])
self._extend_network_dict_provider(context, updated_network)
mech_context = driver_context.NetworkContext(
self, context, updated_network, original_network=original_network
)
self.mechanism_manager.update_network_precommit(mech_context)
# TODO(apech) - handle errors raised by update_network, potentially
# by re-calling update_network with the previous attributes. For
# now the error is propogated to the caller, which is expected to
# either undo/retry the operation or delete the resource.
self.mechanism_manager.update_network_postcommit(mech_context)
return updated_network
开发者ID:ntt-sic,项目名称:neutron,代码行数:20,代码来源:plugin.py
示例9: update_network
def update_network(self, context, network_id, network):
pnet._raise_if_updates_provider_attributes(network['network'])
with context.session.begin(subtransactions=True):
result = super(DFPlugin, self).update_network(context, network_id,
network)
if psec.PORTSECURITY in network['network']:
self._process_network_port_security_update(context,
network['network'],
result)
self._process_l3_update(context, result, network['network'])
network_version = version_db._update_db_version_row(
context.session, network_id)
self.nb_api.update_lswitch(id=network_id,
topic=result['tenant_id'],
name=result.get(
'name',
df_const.DF_NETWORK_DEFAULT_NAME),
router_external=result['router:external'],
version=network_version)
return result
开发者ID:paperandsoap,项目名称:dragonflow,代码行数:21,代码来源:plugin.py
示例10: update_network
def update_network(self, context, id, network):
LOG.debug(
"MidonetPluginV2.update_network called: id=%(id)r, " "network=%(network)r", {"id": id, "network": network}
)
# Disallow update of provider net
net_data = network["network"]
pnet._raise_if_updates_provider_attributes(net_data)
with context.session.begin(subtransactions=True):
net = super(MidonetPluginV2, self).update_network(context, id, network)
self._process_l3_update(context, net, network["network"])
self._extend_provider_network_dict(context, net)
if psec.PORTSECURITY in network["network"]:
self._process_network_port_security_update(context, network["network"], net)
self.client.update_network_precommit(context, id, net)
self.client.update_network_postcommit(id, net)
LOG.debug("MidonetPluginV2.update_network exiting: net=%r", net)
return net
开发者ID:yo-iura,项目名称:networking-midonet,代码行数:21,代码来源:plugin_v2.py
注:本文中的neutron.extensions.providernet._raise_if_updates_provider_attributes函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论