summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_security_group.py
AgeCommit message (Collapse)AuthorFilesLines
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 exceptions for security group settingsspisarski1-8/+26
Raising SecurityGroupSettingsError in SecurityGroupSettings and SecurityGroupRuleSettingsError in SecurityGroupRuleSettings instead of Exception. JIRA: SNAPS-137 Change-Id: I959ffe9a247dc9adffbef460119ba94ad86fd3f0 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-07-11Created domain classes for security groups.spisarski1-44/+39
Created SecurityGroup and SecurityGroupRule classes so the neutron_utils for security groups will be returning objects of these types instead of the OpenStack objects returned by the API calls. JIRA: SNAPS-116 Change-Id: I76ed1f85f7d54b984fc6f6ac28cee7680a1109e5 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-06-20Changes SecurityGroupSettings & SecurityGroupRuleSettings constructor to use ↵spisarski1-112/+137
kwargs. And changed line lengths to 79 for pep8. JIRA: SNAPS-102 Change-Id: Ifa878ba01694eaa17ee05cea5dbbe9bc8bde3cd0 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-05-16Ensure creators' constructors cannot raise exceptions.spisarski1-2/+5
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-29/+26
* 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/+521
Change-Id: I70a2778718c5e7f21fd14e4ad28c9269d3761cc7 Signed-off-by: spisarski <s.pisarski@cablelabs.com>