summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_network.py
AgeCommit message (Collapse)AuthorFilesLines
2017-08-18Specify segmentation_id when creating networkLinda Wang1-0/+5
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-08Added test ability for 2 VMs on different networks to ping each other.spisarski1-1/+1
JIRA: SNAPS-48 Change-Id: I77973fef06343eb7108e998ea8e939c1f2d9d4a6 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-04Refactored neutron_utils#get_subnet_by_name() to get_subnet()spisarski1-5/+4
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-5/+4
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-24Fixed problems when setting the OpenStack project ID.spisarski1-8/+9
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-10/+30
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-15/+11
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-0/+15
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-06-21Fixed launcher app to support new settings kwargs.spisarski1-0/+3
Additionally, found issue with importing ansible libraries. Needed to rename the snaps.provisioning.ansible package to 'ansible_pb'. JIRA: SNAPS-107 & SNAPS-93 Change-Id: I8c8628d3af5ce30849229ed47bfbb0ecaad5b3ad Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-20Changes to NetworkSettings, SubnetSettings, and PortSettings constructors to ↵spisarski1-188/+195
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-16Ensure creators' constructors cannot raise exceptions.spisarski1-30/+27
While creating unit tests for vPing that is using SNAPS, exceptions can be raised when retrieving their respective OpenStack clients with incorrect credentials. Moved client retrieval to the create() method which one should expect exceptions to be raised. JIRA: SNAPS-81 Change-Id: Id8e4279f60b97704b25a89c6312dcf2ebdc3f459 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-08Modified code to support both Python 2.7 and 3.xspisarski1-2/+2
* 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/+519
Change-Id: I70a2778718c5e7f21fd14e4ad28c9269d3761cc7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>