Trivial: Import network.common as network_common in server.py
In server.py, identity.common is imported as identity_common. But network.common is imported as common, which is confuseing. This patch imports network.common as network_common. Change-Id: I74295bc88b22de398ab64fe556aedaca2453d17d
This commit is contained in:
parent
a207c27fc8
commit
dd1ca68f56
@ -37,7 +37,7 @@ from openstackclient.common import parseractions
|
|||||||
from openstackclient.common import utils
|
from openstackclient.common import utils
|
||||||
from openstackclient.i18n import _ # noqa
|
from openstackclient.i18n import _ # noqa
|
||||||
from openstackclient.identity import common as identity_common
|
from openstackclient.identity import common as identity_common
|
||||||
from openstackclient.network import common
|
from openstackclient.network import common as network_common
|
||||||
|
|
||||||
|
|
||||||
def _format_servers_list_networks(networks):
|
def _format_servers_list_networks(networks):
|
||||||
@ -476,15 +476,19 @@ class CreateServer(show.ShowOne):
|
|||||||
if neutron_enabled:
|
if neutron_enabled:
|
||||||
network_client = self.app.client_manager.network
|
network_client = self.app.client_manager.network
|
||||||
if nic_info["net-id"]:
|
if nic_info["net-id"]:
|
||||||
nic_info["net-id"] = common.find(network_client,
|
nic_info["net-id"] = network_common.find(
|
||||||
'network',
|
network_client,
|
||||||
'networks',
|
'network',
|
||||||
nic_info["net-id"])
|
'networks',
|
||||||
|
nic_info["net-id"]
|
||||||
|
)
|
||||||
if nic_info["port-id"]:
|
if nic_info["port-id"]:
|
||||||
nic_info["port-id"] = common.find(network_client,
|
nic_info["port-id"] = network_common.find(
|
||||||
'port',
|
network_client,
|
||||||
'ports',
|
'port',
|
||||||
nic_info["port-id"])
|
'ports',
|
||||||
|
nic_info["port-id"]
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
if nic_info["net-id"]:
|
if nic_info["net-id"]:
|
||||||
nic_info["net-id"] = utils.find_resource(
|
nic_info["net-id"] = utils.find_resource(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user