summaryrefslogtreecommitdiff
path: root/openstackclient/tests/compute
diff options
context:
space:
mode:
authorTang Chen <chen.tang@easystack.cn>2016-02-11 19:09:43 +0800
committerTang Chen <chen.tang@easystack.cn>2016-02-17 17:09:51 +0800
commitd9d1809907256497289ae921bca9a7505a95f6ce (patch)
treedd1494cbea9a70d6fa79f9dd32cf0e2aebcda142 /openstackclient/tests/compute
parentddc97c6dc5bc36d678515aeb9f7b3f9e85bd70d0 (diff)
downloadpython-openstackclient-d9d1809907256497289ae921bca9a7505a95f6ce.tar.gz
Support "network show" command in nova network
"network show" command is not implemented in nova network. This patch implements it. Change-Id: I1fadd890fe36c4e3ac5c9ed389b20c5b2fff8aca partial-Bug: 1543672
Diffstat (limited to 'openstackclient/tests/compute')
-rw-r--r--openstackclient/tests/compute/v2/fakes.py33
1 files changed, 31 insertions, 2 deletions
diff --git a/openstackclient/tests/compute/v2/fakes.py b/openstackclient/tests/compute/v2/fakes.py
index 66e488b7..a4d99ca2 100644
--- a/openstackclient/tests/compute/v2/fakes.py
+++ b/openstackclient/tests/compute/v2/fakes.py
@@ -539,13 +539,42 @@ class FakeNetwork(object):
:param Dictionary methods:
A dictionary with all methods
:return:
- A FakeResource object, with id, label, cidr
+ A FakeResource object, with id, label, cidr and so on
"""
# Set default attributes.
network_attrs = {
+ 'bridge': 'br100',
+ 'bridge_interface': None,
+ 'broadcast': '10.0.0.255',
+ 'cidr': '10.0.0.0/24',
+ 'cidr_v6': None,
+ 'created_at': '2016-02-11T11:17:37.000000',
+ 'deleted': False,
+ 'deleted_at': None,
+ 'dhcp_server': '10.0.0.1',
+ 'dhcp_start': '10.0.0.2',
+ 'dns1': '8.8.4.4',
+ 'dns2': None,
+ 'enable_dhcp': True,
+ 'gateway': '10.0.0.1',
+ 'gateway_v6': None,
+ 'host': None,
'id': 'network-id-' + uuid.uuid4().hex,
+ 'injected': False,
'label': 'network-label-' + uuid.uuid4().hex,
- 'cidr': '10.0.0.0/24',
+ 'mtu': None,
+ 'multi_host': False,
+ 'netmask': '255.255.255.0',
+ 'netmask_v6': None,
+ 'priority': None,
+ 'project_id': 'project-id-' + uuid.uuid4().hex,
+ 'rxtx_base': None,
+ 'share_address': False,
+ 'updated_at': None,
+ 'vlan': None,
+ 'vpn_private_address': None,
+ 'vpn_public_address': None,
+ 'vpn_public_port': None,
}
# Overwrite default attributes.