summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_router.py
AgeCommit message (Collapse)AuthorFilesLines
2017-11-20Refactoring of RouterSettings to extend RouterConfigspisarski1-94/+12
RouterSettings and neutron_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the RouterSettings class. JIRA: SNAPS-223 Change-Id: I6a2a5e6e6e86204e62148a57e3525da5862841cf Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-02Added method to OpenStackHeatStack to return OpenStackRouter objects.spisarski1-4/+3
Continuation of the story SNAPS-153 for adding creator/state machine instances for OpenStack objects deployed via Heat. JIRA: SNAPS-173 Change-Id: Iac9138ef7827c10db1637447d3a909e714a0301b Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-12Improved creator/state machine classes class hierarchy.spisarski1-47/+67
Created abstract superclasses for all classes responsible for deploying and maintaining the state of objects deployed to OpenStack which should help developers better understand the library. JIRA: SNAPS-183 Change-Id: I7651bd338f0d4e4086abbc11755e6be4f19058bd Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-07Refactored neutron_utils#get_router_by_name() to get_router()spisarski1-2/+2
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-07Merge "Refactored neutron_utils#get_subnet_by_name() to get_subnet()"Steven Pisarski1-2/+2
2017-08-04Refactored neutron_utils#get_subnet_by_name() to get_subnet()spisarski1-2/+2
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-03Refactored port retrieval to include PortSettigs.spisarski1-2/+2
Refactored neutron_utils#get_port_by_name to get_port while adding in a port_settings object for more robust query options. JIRA: SNAPS-162 Change-Id: I01222ad344224db94615859448ad05d8d5bc0c30 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-02Refactor network retrieval API calls.spisarski1-3/+2
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-31Fixed failing router test on Aricent pod.spisarski1-2/+1
Removed project ID from network lookup for the router_external network as the test test_create_router_admin_user_to_new_project() as the OpenStackRouter object was including its own project ID to the API call causing the network lookup to fail. Note: this is the only pod where this bug has reared it's ugly head. Change-Id: I159252b3f3c3bc418f9947710e9e97d8471ec538 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-28Remove TODOs from create_router.pyspisarski1-4/+2
Determined not to support the optional router attributes: 'enable_snat' & 'external_fixed_ips' at this time. JIRA: SNAPS-150 Change-Id: I68445fb055668f4cb5f2a2ff80499da0f4160043 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-24Fixed problems when setting the OpenStack project ID.spisarski1-2/+3
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-21Created new classes RouterSettingsError & RouterCreationError.spisarski1-6/+18
Raising RouterSettingsError in RouterSettings and RouterCreationError in OpenStackRouter instead of Exception. JIRA: SNAPS-136 Change-Id: I3ba4824ea80ccfc07b1f15959898936d51bca1de Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-13Created domain classes for networks and subnets.spisarski1-2/+2
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-4/+6
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-20Changes to RouterSettings constructors to use kwargs.spisarski1-63/+82
And changed line lengths to 79 for pep8 JIRA: SNAPS-101 Change-Id: I2b63e4130644ad422aa1f81bcf2627e97d97c035 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-16Ensure creators' constructors cannot raise exceptions.spisarski1-1/+3
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-40/+34
* 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/+244
Change-Id: I70a2778718c5e7f21fd14e4ad28c9269d3761cc7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>