summaryrefslogtreecommitdiffstats
path: root/snaps/openstack/create_security_group.py
AgeCommit message (Collapse)AuthorFilesLines
2017-11-21Refactoring of SecurityGroupSettings to extend SecurityGroupConfigspisarski1-309/+26
SecurityGroupSettings, SecurityGroupSettings and neutron_utils have a runtime cyclical dependency. This patch reduces this dependency and deprecates the SecurityGroupSettings and SecurityGroupRuleSettings class with snaps.config.security_group SecurityGroupConfig and SecurityGroupRuleConfg classes JIRA: SNAPS-224 Change-Id: I6cd82ed5be31f4a24449be767b203e86489b1962 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-16Supporting the protocol string value of 'any' for security group rules.spisarski1-17/+32
This issue had been found by Stuart Mackie when using OpenContrail. Change-Id: I5b57773e19c20028ac736521d461d49341c78cb0 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-11-06Added method to OpenStackHeatStack to return OpenStackSecurityGroup objects.spisarski1-0/+3
Continuation of the story SNAPS-153 for adding creator/state machine instances for OpenStack objects deployed via Heat. JIRA: SNAPS-207 Change-Id: Id479b69c2b166ab38724c3886096d8483998f819 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-26Updated documentation to reflect new block storage support.spisarski1-11/+6
1. Updated library usaged LibraryUsage.rst 2. Added new unit tests to UnitTests.rst 3. Added new component tests to APITests.rst 4. Added new integration tests to IntegrationTests.rst 5. Updated application usage docs in VirtEnvDeploy.rst 6. Updated pydocs where inaccurate JIRA: SNAPS-203 Change-Id: I8bee2c6cdb5f54b86abf805bc930563028df3425 Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-10-12Improved creator/state machine classes class hierarchy.spisarski1-41/+44
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-09-08Enhanced launch.py app to support all types.spisarski1-4/+9
Added application support for users, projects, and security groups. In addition, added support for multiple credential sets so one can manage multiple projects potentially on multiple clouds. Added Jinja2 template support for substituting values in the template file with values contained in the environment file. Added ansible substituion value for a VM's floating IP. Changed credentials interface attribute's default value from 'admin' to 'public'. Added optional pre_sleep_time attribute to ansible execution that will wait for a given number of seconds prior to attempting to apply a playbook to a set of VMs. JIRA: SNAPS-4, SNAPS-5, SNAPS-6, SNAPS-26 Change-Id: I67b8d69a3b06a43631d80e8fe0c56e02773dbfbe Signed-off-by: spisarski <s.pisarski@cablelabs.com>
2017-08-07Refactored neutron_utils#get_security_group()spisarski1-3/+3
Added a sec_grp_settings (SecurityGroupSettings) object parameter in addition to sec_grp_name for more robust query options. JIRA: SNAPS-164 Change-Id: I8bb21ff9e5e6b1f532773ca01d37964f8b47b530 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 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>