summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/tests/create_network_tests.py
AgeCommit message (Collapse)AuthorFilesLines
2017-08-18Specify segmentation_id when creating networkLinda Wang1-4/+39
When the network_type is vlan, it is necessary to specify physical_network and segmentation_id. JIRA: FUNCTEST-863 Change-Id: I44f57cdd825ee3cde7adb946c4f8dc78e3ee5212 Signed-off-by: Linda Wang <wangwulin@huawei.com>
2017-08-07Refactored neutron_utils#get_router_by_name() to get_router()spisarski1-4/+4
Added a router_settings (RouterSettings) object parameter in addition to router_name for more robust query options. JIRA: SNAPS-163 Change-Id: I47672f531171d6ee0c90dabb6641640bf97c1d20 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-04Refactored neutron_utils#get_subnet_by_name() to get_subnet()spisarski1-42/+16
Renamed utility function and added a subnet_settings parameter to hold a SubnetSettings object to help make the query more robust by being able to leverage values on the settings object. JIRA: SNAPS-165 Change-Id: I226a1217dc4ba7bb50f7d985ecfaf3b7bc4f610b Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-02Refactor network retrieval API calls.spisarski1-3/+3
Refactored neutron_utils#get_network() to also accept a NetworkSettings object for more robust queries in addition to the old network_name parameter. Also refactored neutron_utils# get_network_by_id to add in the ID to list_networks((**{'id': id) and returning the first item contains the expected ID value. JIRA: SNAPS-161 Change-Id: Ie670a442dd70633bbef7a1233e630672ebac6b0c Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-26Removed TODO from comment about the physical network value.spisarski1-1/+2
JIRA: SNAPS-123 Change-Id: Ie4085a35816a78cb5b4b910d52ddccaf6b102b1f Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-24Fixed problems when setting the OpenStack project ID.spisarski1-0/+60
There were several calls to retrieve the project ID that required named parameters which was causing the utility function to always return None. Additionally, when creating the dict() required by the Neutron create API 'body' parameter key 'project_id' is not supported and still uses 'tenant_id'. As these problems should have been found earlier, this patch also extends the tests for networks, subnets, ports, and security groups to use 'tenant_id' rather than 'project_id'. JIRA: SNAPS-143 Change-Id: Ic69e56145ea6070718d821edd22a1d0f9970995d Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-20Created new exception classes for networks.spisarski1-11/+14
Raising NetworkSettingsError in NetworkSettings, SubnetSettingsError in SubnetSettings and PortSettingsError in PortSettings instead of Exception. JIRA: SNAPS-134 Change-Id: I724d9e115e41767a9e3596d85db2a20ee8de5f73 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-13Created domain classes for networks and subnets.spisarski1-8/+5
Created Network and Subnet domain classes so neutron_utils.py functions returning these types of objects will not be leaking out implementation details as each API version can change these data structures which is now being handled by the SNAPS neutron utility. JIRA: SNAPS-113 Change-Id: Id95dd0f8c2618c20a1a73a428abb95686dfa8251 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-13Created domain class for routers.spisarski1-10/+16
Created Router domain class so neutron_utils.py functions returning router objects will not be leaking out implementation details as each API version can change these data structures and this should all be handled by the SNAPS neutron utility. JIRA: SNAPS-115 & SNAPS-14 Change-Id: Ib6d36a735d835a6ed4ede489b14e33a261458fed Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-06Completed tests for creating networks of different types.spisarski1-44/+37
Change-Id: I33601da3f51d7acc60bd646e1d783a07afd8ea45 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-20Changes to NetworkSettings, SubnetSettings, and PortSettings constructors to ↵spisarski1-75/+128
use kwargs. And changed line lengths to 79 for pep8 JIRA: SNAPS-99 Change-Id: Iedb3ff663dc9d71ce774b5c4c1d0bef601f792da Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-08Modified code to support both Python 2.7 and 3.xspisarski1-92/+92
* Tested on Python 2.7.10 and 3.4.4 * Updated installation documentation JIRA: SNAPS-30 Change-Id: I94a37d218be8ea47bbbcfb560197737430fcb3ba Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-02-15Initial patch with all code from CableLabs repository.spisarski1-0/+533
Change-Id: I70a2778718c5e7f21fd14e4ad28c9269d3761cc7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>