snaps.git
6 years agoFixed bug with regards to subnet lookups. 91/56091/1 opnfv-6.0.0 opnfv-6.1.0
spisarski [Tue, 17 Apr 2018 14:24:18 +0000 (08:24 -0600)]
Fixed bug with regards to subnet lookups.
Neutron returns all subnets regardless of visibility which cause problems
within routers if there is another subnet with the same name attached to
a different network.

JIRA: SNAPS-304

In addition, this patch contains two other minor fixes.
  launch_utils.py - raise an exception when the creator is not properly instantiated
  network.py - allow fixed IPs to be none.

Change-Id: Ib343074d925be4592a713727a03d5b531890eada
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdding assertion message to test validation. 87/56087/1
spisarski [Thu, 19 Apr 2018 21:11:23 +0000 (15:11 -0600)]
Adding assertion message to test validation.

Change-Id: I609d09ed8b4f75baeb1ad5454c9ddde9e996a3fe
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoFixed bug when use_keystone parameter is False. 93/55693/1
spisarski [Thu, 12 Apr 2018 16:32:44 +0000 (10:32 -0600)]
Fixed bug when use_keystone parameter is False.

When false, the self.keystone member is None and now it is being
used in many more places with some of the other changes during
the Fraser release

JIRA: SNAPS-299

Change-Id: I752afb127287036a16f3c9b00e6feae9cab80143
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
(cherry picked from commit f9003b2925fd340998fd38fd353fba187aeadc69)

6 years agoRemove test_create_volume_bad_zone 07/54307/1
Linda Wang [Thu, 22 Mar 2018 11:51:49 +0000 (11:51 +0000)]
Remove test_create_volume_bad_zone

JIRA: FUEL-356

Fuel/MCP has set allow_availability_zone_fallback option to True.
If the requested Cinder availability zone is unavailable, fall back
to the value of default_availability_zone, then storage_availability_zone,
instead of failing.

Change-Id: I04f45f8435dbdf1113ac6b2c50bf913c1f29cd20
Signed-off-by: Linda Wang <wangwulin@huawei.com>
6 years agoAdded ability to set several quota settings upon project creation. 33/54133/1
spisarski [Mon, 19 Mar 2018 17:54:34 +0000 (11:54 -0600)]
Added ability to set several quota settings upon project creation.

JIRA: SNAPS-275

Change-Id: Ibab81e835dddcb666fb3c829857b1c4676b57ed1
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded test to ensure a port to the external network can be added to 85/53685/2
spisarski [Tue, 13 Mar 2018 14:58:38 +0000 (08:58 -0600)]
Added test to ensure a port to the external network can be added to
a router by an 'admin' user.

JIRA: SNAPS-283

Change-Id: I78a48862de5bd48dca7dc38d197c0df315003638
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded tests to ensure multiple IP addresses can be assigned to a VM port. 27/53427/3
spisarski [Fri, 9 Mar 2018 17:15:15 +0000 (10:15 -0700)]
Added tests to ensure multiple IP addresses can be assigned to a VM port.

JIRA: SNAPS-284

Change-Id: I43528434523a137a78d1f1f8d22496341f78492b
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded test to ensure VM instances spawned by an admin user can 27/53327/2
spisarski [Thu, 8 Mar 2018 17:39:37 +0000 (10:39 -0700)]
Added test to ensure VM instances spawned by an admin user can
have an external network used on a port.

JIRA: SNAPS-282

Change-Id: I3ee2fef65d1751880e576dc8f6a797260d1028ee
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoReverse engineer OpenStackHeatStack 69/53269/4
spisarski [Wed, 7 Mar 2018 23:58:42 +0000 (16:58 -0700)]
Reverse engineer OpenStackHeatStack

Added support for obtaining an initialized
OpenStackHeatStack object from an existing Stack object

JIRA: SNAPS-278

Change-Id: I68cb0c85179868e4e3899b5516316dda3321e9f6
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Fixed a few Py 2.7 -> 3.x issues."
Steven Pisarski [Tue, 13 Mar 2018 13:25:56 +0000 (13:25 +0000)]
Merge "Fixed a few Py 2.7 -> 3.x issues."

6 years agoFixed a few Py 2.7 -> 3.x issues. 03/53603/1
spisarski [Mon, 12 Mar 2018 22:29:46 +0000 (16:29 -0600)]
Fixed a few Py 2.7 -> 3.x issues.

JIRA: SNAPS-286

Change-Id: Ib4976529168655df0ed906276b503b70a8459f21
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded support for running tests in parallel. 85/53585/1
spisarski [Mon, 12 Mar 2018 16:22:01 +0000 (10:22 -0600)]
Added support for running tests in parallel.

JIRA: SNAPS-215

Change-Id: I94923a9f184b0d370159b499919e8fc20a2fef90
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoClosing keystone sessions after done with them. 35/53435/4
spisarski [Fri, 9 Mar 2018 21:42:34 +0000 (14:42 -0700)]
Closing keystone sessions after done with them.

By not closing all of the keystone sessions being created when
running all of the tests, this may be the root cause to the IOError
occasionally being observed:

IOError: [Errno 24] Too many open files

JIRA: SNAPS-285

Change-Id: I7fc7ab0c6cdd02f1ae32bb3ae4f121cb465d5693
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded members to VmInst that will contain the availability_zone 63/53263/4
spisarski [Wed, 7 Mar 2018 21:52:44 +0000 (14:52 -0700)]
Added members to VmInst that will contain the availability_zone
and compute_host names while deprecating the method get_vm_info().

JIRA: SNAPS-277

Change-Id: Idc8578b3f2cf2be8ef90f52dd025dbea729b222b
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoEnsure the project for volumes are handled properly. 55/53255/4
spisarski [Wed, 7 Mar 2018 20:01:37 +0000 (13:01 -0700)]
Ensure the project for volumes are handled properly.

Although this patch has added the project_name member to
VolumeConfig, it does not work properly due to a cinder bug
https://bugs.launchpad.net/cinder/+bug/1641982. However, the
code will now allow for volumes with the same name to be
created on the same pod just as long as they do not exist
within the same project/tenant.

JIRA: SNAPS-270

Change-Id: Ia6f98e9b66793a69c0205d2d8e38bb3d03f3333e
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoUpdated stack tests to only use an admin user when necessary. 87/53187/2
spisarski [Tue, 6 Mar 2018 21:52:31 +0000 (14:52 -0700)]
Updated stack tests to only use an admin user when necessary.

Changed super test class OSIntegrationTestCase to allow subclasses
to set the user roles when required. For all heat stack test,
the user role will always be 'heat_stack_owner'. 'admin' will be
used for tests requiring this role (i.e. heat template creates
flavors)

JIRA: SNAPS-268

Change-Id: I0ec01cfea6297547a6a158eec8e5c69af6d6c7d7
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoEnsure project for routers are handled properly. 75/52675/6
spisarski [Mon, 26 Feb 2018 16:51:45 +0000 (09:51 -0700)]
Ensure project for routers are handled properly.

Routers should be able to be created by admin users to other
projects. Routers without admin users should only be able to
create ones to their default project.

JIRA: SNAPS-266

Change-Id: I5ecfbcc2ed94bbab211751da9521f3ec1d4ff66d
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoFixed subnet gateway support to allow for disabling the gateway. 77/52777/3
spisarski [Tue, 27 Feb 2018 20:27:47 +0000 (13:27 -0700)]
Fixed subnet gateway support to allow for disabling the gateway.

JIRA: SNAPS-276

Change-Id: Ia676b91ee881097ca7502fb4b9f5c64961de2214
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoChanged pattern on how objects lookup themselves by name and project. 73/52473/1
spisarski [Thu, 22 Feb 2018 18:42:52 +0000 (11:42 -0700)]
Changed pattern on how objects lookup themselves by name and project.

The pattern being replaced has unwittingly added the requirement that
all creator credentials must be of type 'admin' as when looking up
the associated project ID required a call to keystone.projects.list().

As the SNAPS integration tests were always creating users with an 'admin'
role, this issue was not caught. As part of this patch, integration test
users will no longer be admin.

JIRA: SNAPS-274

Change-Id: I02957f69e31a9d4dfa63362d371f061687e59fbf
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoopenstack: nova_utils_tests: Wait for volume detachment 71/52371/1
Markos Chandras [Tue, 20 Feb 2018 17:19:13 +0000 (17:19 +0000)]
openstack: nova_utils_tests: Wait for volume detachment

The 'test_add_remove_volum' is supposed to wait for volume attachment
and detachments. However, the code for the latter was missing. Moreover,
we remove some code that checks for attached volumes since that should
never happen when detaching the volume.

Change-Id: I9ed54a467062d0ddc4efeddf03af7ebe6173e789
Signed-off-by: Markos Chandras <mchandras@suse.de>
6 years agoopenstack: nova_utils_tests: Increase timeout for API calls 59/52359/1
Markos Chandras [Tue, 20 Feb 2018 15:13:29 +0000 (15:13 +0000)]
openstack: nova_utils_tests: Increase timeout for API calls

Patch I2245adb84d0e6d4e3350d17d0c2e44baf5202d51 increased the timeout
for the API calls to 2 minutes which was then somewhat reverted in
Iea3aeab59c378917fbd175d673113e8d30e2e4b9. However, the problem still
persists on slow systems and 30 seconds may not be enough to confirm
a volume attachment to the VM.

Change-Id: I860b2a797917e13772e95c5d756919e9792b63a6
Signed-off-by: Markos Chandras <mchandras@suse.de>
6 years agoEnsure project IDs are handled correctly for Network/Subnets 45/52245/1
spisarski [Fri, 16 Feb 2018 15:35:07 +0000 (08:35 -0700)]
Ensure project IDs are handled correctly for Network/Subnets

JIRA: SNAPS-265

Change-Id: If58f5817e52e21be377d2b06a5f7c3a413454350
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded functionality for OpenStackSecurityGroup#initialize() not to accept 57/52157/3
spisarski [Wed, 14 Feb 2018 16:38:54 +0000 (09:38 -0700)]
Added functionality for OpenStackSecurityGroup#initialize() not to accept
security groups with the same name from a different project

JIRA: SNAPS-264

Change-Id: I7c905e5588d5e503b47ea0e9f5997be89e841aec
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Compare strings instead of objects in SecurityGroupConfig"
Steven Pisarski [Thu, 15 Feb 2018 14:24:14 +0000 (14:24 +0000)]
Merge "Compare strings instead of objects in SecurityGroupConfig"

6 years agoMerge "Set region_name in get_os_creds()"
Steven Pisarski [Thu, 15 Feb 2018 14:21:36 +0000 (14:21 +0000)]
Merge "Set region_name in get_os_creds()"

6 years agoCompare strings instead of objects in SecurityGroupConfig 73/52173/1
Cédric Ollivier [Wed, 14 Feb 2018 20:59:04 +0000 (21:59 +0100)]
Compare strings instead of objects in SecurityGroupConfig

It could have worked thanks to interned strings.

Change-Id: If56cc44fe35ca06bc9033af620ddd3c0586877fe
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
6 years agoMerge "Fixed comment"
Steven Pisarski [Wed, 14 Feb 2018 16:04:53 +0000 (16:04 +0000)]
Merge "Fixed comment"

6 years agoFixed comment 53/52153/1
spisarski [Wed, 14 Feb 2018 16:04:16 +0000 (09:04 -0700)]
Fixed comment

Change-Id: Ib226ef99eed2fda2c7112faf0f0e9339afed90fe
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoSet region_name in get_os_creds() 43/52143/1
Cédric Ollivier [Wed, 14 Feb 2018 09:06:31 +0000 (10:06 +0100)]
Set region_name in get_os_creds()

Change-Id: Idb6912319e24edb39e18114bd3c1ef5bca750752
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
6 years agoUpdate the DNS default value in docstrings 33/51933/1
Cédric Ollivier [Thu, 8 Feb 2018 21:13:47 +0000 (22:13 +0100)]
Update the DNS default value in docstrings

It completes the previous patch [1] about that topic.

[1] https://gerrit.opnfv.org/gerrit/#/c/51845/

Change-Id: Ib2ba07c0d5608bd452ed209544d4dbfc17124299
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
6 years agoStop setting 8.8.8.8 as default DNS server 45/51845/2
Cédric Ollivier [Wed, 7 Feb 2018 08:50:42 +0000 (09:50 +0100)]
Stop setting 8.8.8.8 as default DNS server

That could easily raise side effect as it overrides default configs
set by Cloud providers.

Change-Id: I659d16f8f58bba3a07b8ae2ee2270aa69c200ed5
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
6 years agoMerge "Fixed timeout logic when attaching/detaching volumes."
Steven Pisarski [Tue, 6 Feb 2018 22:27:01 +0000 (22:27 +0000)]
Merge "Fixed timeout logic when attaching/detaching volumes."

6 years agoFixed timeout logic when attaching/detaching volumes. 95/51695/12
spisarski [Mon, 5 Feb 2018 18:52:55 +0000 (11:52 -0700)]
Fixed timeout logic when attaching/detaching volumes.

The timeout logic in nova_utils.attach_volume() and detach_volume()
was not correct which may have been the root cause behind the issue
FUNCTEST-927. Timeout in both attach and detach is no longer
optional.

Also added a test to attach and detach without timeout as that path
was never tested. Updated associated test documentation as well.

JIRA: SNAPS-263
JIRA: FUNCTEST-927

Change-Id: Iea3aeab59c378917fbd175d673113e8d30e2e4b9
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Fixed OSCreds retrieval."
Steven Pisarski [Mon, 5 Feb 2018 20:12:24 +0000 (20:12 +0000)]
Merge "Fixed OSCreds retrieval."

6 years agoAdded 3 new subnet values for ansible substitutions 99/51699/1
spisarski [Mon, 5 Feb 2018 19:10:43 +0000 (12:10 -0700)]
Added 3 new subnet values for ansible substitutions

Change-Id: Idd39e4f6e3f22fcbafe3aae2512ac36cf9e2a417
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoFixed OSCreds retrieval. 97/51697/1
spisarski [Mon, 5 Feb 2018 19:07:40 +0000 (12:07 -0700)]
Fixed OSCreds retrieval.

The optional parameter 'project_name' was never getting
a default value when not used causing an OSCredsError
to be raised.

Change-Id: I2a0986c62c5d9520f60ebd06db1f3a749e62361c
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "openstack: nova_utils_tests: Use API timeout argument instead of sleep()"
Steven Pisarski [Thu, 1 Feb 2018 14:33:22 +0000 (14:33 +0000)]
Merge "openstack: nova_utils_tests: Use API timeout argument instead of sleep()"

6 years agoopenstack: nova_utils_tests: Use API timeout argument instead of sleep() 15/51415/1
Markos Chandras [Wed, 31 Jan 2018 19:03:43 +0000 (19:03 +0000)]
openstack: nova_utils_tests: Use API timeout argument instead of sleep()

On slow environments, time.sleep(10) is not enough for attach/detach API
calls to propage properly leading to failures like the following one
(reduced api_check test)

2018-01-31 18:53:19,297 - functest.ci.run_tests - INFO - Running test case 'api_check'...
2018-01-31 18:54:27,434 - functest.ci.run_tests - INFO - Test result:

+-------------------+------------------+------------------+----------------+
|     TEST CASE     |     PROJECT      |     DURATION     |     RESULT     |
+-------------------+------------------+------------------+----------------+
|     api_check     |     functest     |      01:07       |      FAIL      |
+-------------------+------------------+------------------+----------------+

We can workaround this by using the nova_utils.{de,at}tach_volume}
'timeout' argument to wait up to 2 minutes for the attach/detach call to
complete. This doesn't affect normal exception whilst it helps get the
test going on slow systems. WIth this change, the api_check (reduced
test) passes as follows:

2018-01-31 18:48:35,469 - functest.ci.run_tests - INFO - Running test case 'api_check'...
2018-01-31 18:50:56,705 - functest.ci.run_tests - INFO - Test result:

+-------------------+------------------+------------------+----------------+
|     TEST CASE     |     PROJECT      |     DURATION     |     RESULT     |
+-------------------+------------------+------------------+----------------+
|     api_check     |     functest     |      02:20       |      PASS      |
+-------------------+------------------+------------------+----------------+

Change-Id: I2245adb84d0e6d4e3350d17d0c2e44baf5202d51
Signed-off-by: Markos Chandras <mchandras@suse.de>
6 years agoRemove a wrong @property 11/51411/1
Cédric Ollivier [Wed, 31 Jan 2018 18:57:53 +0000 (19:57 +0100)]
Remove a wrong @property

Else OSCreds.__str__() simply doesn't work.

Change-Id: I0a0147862ad3015dc9cf284c61429f1534a47d61
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
6 years agoMerge "Changed invalid gateway IP to ensure fails with all OS configurations."
Steven Pisarski [Wed, 31 Jan 2018 17:02:22 +0000 (17:02 +0000)]
Merge "Changed invalid gateway IP to ensure fails with all OS configurations."

6 years agoChanged invalid gateway IP to ensure fails with all OS 65/51365/2
spisarski [Tue, 30 Jan 2018 19:30:56 +0000 (12:30 -0700)]
Changed invalid gateway IP to ensure fails with all OS
configurations.

Change-Id: I35374ea5fa79974c43c2a474e43ff275b26dfc02
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Changed the way floating IPs are getting assigned to VMs as the previous means...
Steven Pisarski [Wed, 31 Jan 2018 17:00:27 +0000 (17:00 +0000)]
Merge "Changed the way floating IPs are getting assigned to VMs as the previous means was not compatible with python-novaclient==10.0.0"

6 years agoChanged network and keypair naming to be dynamic 69/51369/1
spisarski [Tue, 30 Jan 2018 19:56:20 +0000 (12:56 -0700)]
Changed network and keypair naming to be dynamic

Change-Id: I227433e92fc7f42924fa9404ff3c394c79500a1b
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoChanged the way floating IPs are getting assigned to VMs as the previous 27/51327/1
spisarski [Mon, 29 Jan 2018 21:05:18 +0000 (14:05 -0700)]
Changed the way floating IPs are getting assigned to VMs as the previous
means was not compatible with python-novaclient==10.0.0

JIRA: SNAPS-258

Change-Id: I56f7a8341c81e0ae5596f67d4d15ef6c26e0e680
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAvoid checking Keystone v3 domains when using API v2.0 17/51317/3
Georg Kunz [Mon, 29 Jan 2018 15:24:48 +0000 (16:24 +0100)]
Avoid checking Keystone v3 domains when using API v2.0

Introducing a version check to avoid checking keystone domains,
which are an auth API v3 feature, when only auth API v2.0 is
being used.

Change-Id: I220c6637e5f65124e5dbe7d5246490c3986b7a66
Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
6 years agoNova 10 breaks the lib 01/51001/1
spisarski [Tue, 23 Jan 2018 16:26:17 +0000 (09:26 -0700)]
Nova 10 breaks the lib

Change-Id: Iadb5e44836258e5d9a89090c4b0302d2689a40c5
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Added password support for SSH and Ansible Additional protections when initial...
Steven Pisarski [Tue, 23 Jan 2018 16:18:51 +0000 (16:18 +0000)]
Merge "Added password support for SSH and Ansible Additional protections when initializing network resources Enhanced playbook runner variable support"

6 years agoAdded password support for SSH and Ansible 71/50971/2
spisarski [Tue, 23 Jan 2018 02:27:31 +0000 (19:27 -0700)]
Added password support for SSH and Ansible
Additional protections when initializing network resources
Enhanced playbook runner variable support

Change-Id: Id897c4ece1de706afbc52d0a034ca3bfb68fdce3
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Fix Malformed Table in Integration Tests doc"
Steven Pisarski [Fri, 19 Jan 2018 14:38:30 +0000 (14:38 +0000)]
Merge "Fix Malformed Table in Integration Tests doc"

6 years agoChange exception message. 77/50777/1
spisarski [Thu, 18 Jan 2018 15:09:59 +0000 (08:09 -0700)]
Change exception message.

Change-Id: I120faaa8695db5f83e39b521aaa6c1ab68e7fcc1
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded post processing task after application of an Ansible playbook. 01/50701/1
spisarski [Tue, 16 Jan 2018 14:46:29 +0000 (07:46 -0700)]
Added post processing task after application of an Ansible playbook.

The only task currently supported is reboot.

Change-Id: I9089c593af30db071508a47667381238fe91e44e
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoFixed vm instance instantiation from Heat when using nested resources 43/50443/3
spisarski [Thu, 11 Jan 2018 17:24:32 +0000 (10:24 -0700)]
Fixed vm instance instantiation from Heat when using nested resources

* Simplified the configuration of file resources
* Added integration test

JIRA: SNAPS-255

Change-Id: I1065d9352865d7a9f946a5d9947e32e7340f20bc
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded port security flag support to ports. 79/50379/1
spisarski [Wed, 10 Jan 2018 19:13:56 +0000 (12:13 -0700)]
Added port security flag support to ports.

Change-Id: Ib66607b7656093c5f0cd0e2cb4c0aa9c3b9c661a
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Added support for Heat resource files."
Steven Pisarski [Tue, 9 Jan 2018 18:30:12 +0000 (18:30 +0000)]
Merge "Added support for Heat resource files."

6 years agoMerge "Support network configuration overridden"
Steven Pisarski [Wed, 3 Jan 2018 17:05:52 +0000 (17:05 +0000)]
Merge "Support network configuration overridden"

6 years agoAdded new configuration option for OpenStackVmInstance for cloud-init 51/49951/1
spisarski [Wed, 3 Jan 2018 17:00:43 +0000 (10:00 -0700)]
Added new configuration option for OpenStackVmInstance for cloud-init

Added cloud_init_timeout to VM instance configuration to override the
default timeout value hardcoded @ 120 seconds. This patch not only
expands the default value to 300, but also allows the client to override
this value as cloud-init can take quite some time depending on what is
being requested.

Change-Id: Ia4d0a54ce853a93748b16945f5ddd4d5887feb7d
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Enhancements to the SNAPS orchestrator/launcher"
Steven Pisarski [Wed, 3 Jan 2018 15:02:33 +0000 (15:02 +0000)]
Merge "Enhancements to the SNAPS orchestrator/launcher"

6 years agoSupport network configuration overridden 99/49899/1
Linda Wang [Wed, 3 Jan 2018 03:13:02 +0000 (03:13 +0000)]
Support network configuration overridden

When the network_type is vlan, the params physical_network and
segmentation_id should be accepted as arguments when creating
network.

JIRA: SNAPS-252

Change-Id: I3a7bec8a592ede65b97eff0911d09a8154349385
Signed-off-by: Linda Wang <wangwulin@huawei.com>
6 years agoConfigure physical_network when creating network 43/49643/6
Linda Wang [Tue, 26 Dec 2017 02:49:05 +0000 (02:49 +0000)]
Configure physical_network when creating network

When the network_type is vlan, configuring physical_network
and segmentation_id should be supported by snaps.
Here only testcase test_check_vm_ip_dhcp is changed, which is
consumed by functest.

JIRA: SNAPS-252

Change-Id: I12ae12f62f73f2ae66fe7ee12a49abf0394669cd
Signed-off-by: Linda Wang <wangwulin@huawei.com>
6 years agoAdded support for Heat resource files. 61/49761/1
spisarski [Fri, 29 Dec 2017 16:21:05 +0000 (09:21 -0700)]
Added support for Heat resource files.

Change-Id: I936c0ef5570b5b417e4649504a817f0ca216812f
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoEnhancements to the SNAPS orchestrator/launcher 45/49745/1
spisarski [Thu, 28 Dec 2017 23:09:48 +0000 (16:09 -0700)]
Enhancements to the SNAPS orchestrator/launcher

Added support for more Ansible substitution values extracted
from OpenStack instances (i.e. subnet broadcast address, router
external IP for gateway configuration, CIDR IP, netmask, etc.)

Removed most try/except blocks to ensure processing does not
continue when a problem should arise

Added the ability to know when cloud-init has completed

Removed nic configuration from OpenStackVmInstance as userdata/
cloud-init/cloud-config should be performing that functionality

Fixed some logging messages

Misc launcher bug fixes

Change-Id: I73e7607ee158cce3d16f9c1c1fc7c32ef5899a1d
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded substitution variable support. 85/49485/1
spisarski [Thu, 21 Dec 2017 15:46:49 +0000 (08:46 -0700)]
Added substitution variable support.

Change-Id: I57e10be315c288d75d61b014940cd02c0c0134fa
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoReturn the floating ip object 63/49263/3
Manuel Buil [Tue, 19 Dec 2017 09:18:41 +0000 (10:18 +0100)]
Return the floating ip object

Sometimes it might be useful to have the floating ip object which was assigned

Change-Id: I883ec2af448cd38dad2e0d24843c92e7ab495c2f
Signed-off-by: Manuel Buil <mbuil@suse.com>
6 years agoRefactored VmInst domain class for Ports. 17/49217/1
spisarski [Mon, 18 Dec 2017 17:02:02 +0000 (10:02 -0700)]
Refactored VmInst domain class for Ports.

Removed network dict and replaced with a list of Port domain
objects. The old network member was directly copied into the
VmInst object from neutron meaning that Neutron implementation
details were leaking through. This refactor not only makes
VmInst objects easier to use, it also ensures that future
Neutron API changes will not break the library.

JIRA: SNAPS-251

Change-Id: I3e5e811e433bf7670ecd80405186ac2ac0739def
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded utility function to retrieve the names of all hosts with a hypervisor. 73/48973/1
spisarski [Thu, 14 Dec 2017 15:25:17 +0000 (08:25 -0700)]
Added utility function to retrieve the names of all hosts with a hypervisor.

Change-Id: I25b91c6eee78ebf35785c4884dded7c9ab2cc412
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoSet the ram of flavor to 1024 05/48505/5
Linda Wang [Thu, 7 Dec 2017 07:39:46 +0000 (07:39 +0000)]
Set the ram of flavor to 1024

The setting of hw:mem_page_size=large indicates larger page sizes
for guest RAM, eg., either 2MB or 1GB on x86.
When tested on compass, 1GB is required

Change-Id: I22d2fcab190e465dd1c36bc4264c75c724c6f64d
Signed-off-by: Linda Wang <wangwulin@huawei.com>
6 years agoAdded the ability to reboot OpenStack server instances 47/48247/2
spisarski [Fri, 1 Dec 2017 18:06:23 +0000 (11:06 -0700)]
Added the ability to reboot OpenStack server instances

JIRA: SNAPS-243

Change-Id: I7232ee14cac81d39d86e7391a4e006b8276ed536
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Added ability to add a floating IP to an existing instance"
Steven Pisarski [Mon, 4 Dec 2017 21:30:34 +0000 (21:30 +0000)]
Merge "Added ability to add a floating IP to an existing instance"

6 years agoMove CreateInstanceIPv6NetworkTests from staging to integration. 61/48261/1
spisarski [Fri, 1 Dec 2017 18:27:52 +0000 (11:27 -0700)]
Move CreateInstanceIPv6NetworkTests from staging to integration.

Change-Id: Icf381661c56ecf19311ebc95210686bc20eb124e
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded ability to add a floating IP to an existing instance 17/48217/2
spisarski [Fri, 1 Dec 2017 16:48:50 +0000 (09:48 -0700)]
Added ability to add a floating IP to an existing instance

Patch includes:
1. Ability to easily retrive an initialized OpenStackVmInstance object
2. Added method to OpenStackVmInstance named "add_floating_ip"
3. Tests to ensure floating IPs added after initialization actually work

JIRA: SNAPS-241, SNAPS-242

Change-Id: I1f413645a752c17fd624ecff26e851068bb77e3f
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Deactivated test heat template's volume encryption."
Steven Pisarski [Fri, 1 Dec 2017 14:14:17 +0000 (14:14 +0000)]
Merge "Deactivated test heat template's volume encryption."

6 years agoDeactivated test heat template's volume encryption. 27/48127/1
spisarski [Thu, 30 Nov 2017 21:35:53 +0000 (14:35 -0700)]
Deactivated test heat template's volume encryption.

Removed volume encryption from the test volume heat template as
it is no longer operating properly against a Pike pod. Created the
ticket SNAPS-245 to address this issue sometime in the future.

JIRA: SNAPS-240

Change-Id: I610dbba4ebadd5dfb360a665b7a543be6ef5fb1c
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded exception handling around adding security groups. 11/48111/1
spisarski [Thu, 30 Nov 2017 18:57:40 +0000 (11:57 -0700)]
Added exception handling around adding security groups.

When a VM instance has a security group associated with it and
the client attempts to add the same security group, a Pike pod
now raises a ClientException where previous releases simply return
None. This patch adds the appropriate exception handling that
allows several existing tests to pass not only with Pike but also
with all OpenStack versions.

JIRA: SNAPS-239

Change-Id: I282df5a2b516dab415ba5e2e7208176f2ba3f270
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoCluster template cleanup 37/48037/1
spisarski [Wed, 29 Nov 2017 20:11:20 +0000 (13:11 -0700)]
Cluster template cleanup

Removal of negative tests where an invalid keypair is being
configured. This test was not operating consistently between
pods

Update testing documentation

Updated some invalid class names in pydoc

Change-Id: I7a392e9ed993450de40a20457044ba8294d45044
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded cluster template creator/state machine class. 75/47975/1
spisarski [Tue, 28 Nov 2017 20:16:54 +0000 (13:16 -0700)]
Added cluster template creator/state machine class.

Created class and tests for creating and managing cluster templates.

JIRA: SNAPS-235

Change-Id: Ia91aef9507fc39d1814dce03169aab0b784721a6
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoExpanded the tests for ClusterTypes 69/47869/1
spisarski [Mon, 27 Nov 2017 17:21:09 +0000 (10:21 -0700)]
Expanded the tests for ClusterTypes

JIRA: SNAPS-233

Change-Id: Ibba9b7046b95b5523cde525c4a4ed971f463a19d
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoUpdated comments for ID version 2 vs. 3 49/47849/1
spisarski [Mon, 27 Nov 2017 15:16:39 +0000 (08:16 -0700)]
Updated comments for ID version 2 vs. 3

Change-Id: Ib51076cb9fa1c3f52c619a5682ae4a11f64580a9
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoImplemented the ability to create Magnum Cluster Type objects. 73/47673/3
spisarski [Wed, 22 Nov 2017 21:55:43 +0000 (14:55 -0700)]
Implemented the ability to create Magnum Cluster Type objects.

This patch is the second of several necessary for the addition of
Magnum support. This one implements a create and delete function
to magnum_utils.py as well as the necessary config and domain classes
for sending and receiving Cluster Type data to OpenStack.

JIRA: SNAPS-233

Change-Id: Iad1959b98eaabc4ef5f41b70a23f6b1306259650
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoRefactoring of SecurityGroupSettings to extend SecurityGroupConfig 33/47533/2
spisarski [Mon, 20 Nov 2017 21:56:44 +0000 (14:56 -0700)]
Refactoring of SecurityGroupSettings to extend SecurityGroupConfig

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>
6 years agoRefactoring of VmInstanceSettings to extend VmInstanceConfig 31/47531/1
spisarski [Mon, 20 Nov 2017 20:51:18 +0000 (13:51 -0700)]
Refactoring of VmInstanceSettings to extend VmInstanceConfig

VmInstanceSettings, FloatingIPSettings and nova_utils have a
runtime cyclical dependency. This patch reduces this dependency and
deprecates the VmInstanceSettings and FloatingIPSettings class with
snaps.config.vm_inst VmInstanceConfig and FloatingIpConfg classes

JIRA: SNAPS-218

Change-Id: I95688130256bca1df4a5c347bdb741019ae0937e
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Supporting the protocol string value of 'any' for security group rules."
Steven Pisarski [Mon, 20 Nov 2017 20:05:41 +0000 (20:05 +0000)]
Merge "Supporting the protocol string value of 'any' for security group rules."

6 years agoRefactoring of NetworkSettings to extend NetworkConfig 41/47441/4
spisarski [Fri, 17 Nov 2017 23:07:40 +0000 (16:07 -0700)]
Refactoring of NetworkSettings to extend NetworkConfig

This also includes SubnetSettings extending to SubnetConfig and
PortSettings extenting to Portconfig and neutron_utils have a runtime cyclical
dependency. This patch reduces this dependency and deprecates the NetworkSettings,
SubnetSettings, and PortSettings classes.

JIRA: SNAPS-220

Change-Id: I996d73d9b910c075a6511a423f01d966f5b6fb74
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoRefactoring of VolumeSettings to extend VolumeConfig 37/47437/2
spisarski [Fri, 17 Nov 2017 21:54:46 +0000 (14:54 -0700)]
Refactoring of VolumeSettings to extend VolumeConfig

VolumeSettings and cinder_utils have a runtime cyclical
dependency. This patch reduces this dependency and
deprecates the VolumeSettings class.

JIRA: SNAPS-227

Change-Id: I3f93702ff836af365c811d44bfd0e59b76c3f1f5
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoRefactoring of VolumeTypeSettings to extend VolumeTypeConfig 35/47435/2
spisarski [Fri, 17 Nov 2017 21:05:29 +0000 (14:05 -0700)]
Refactoring of VolumeTypeSettings to extend VolumeTypeConfig

This also includes VolumeTypeEncryptionSettings extending to
VolumeTypeEncryptionConfig which is a member of VolumeTypeConfig
VolumeTypeSettings and cinder_utils have a runtime cyclical
dependency. This patch reduces this dependency and
deprecates the VolumeTypeSettings class.

JIRA: SNAPS-228

Change-Id: Iaa9c7a1cd810cf63d1badb00f71bcdcefb527e12
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoRefactoring of QoSSettings to extend QoSConfig 33/47433/3
spisarski [Fri, 17 Nov 2017 20:11:09 +0000 (13:11 -0700)]
Refactoring of QoSSettings to extend QoSConfig

QoSSettings and cinder_utils have a runtime cyclical
dependency. This patch reduces this dependency and
deprecates the QoSSettings class.

JIRA: SNAPS-222

Change-Id: I6385717b78db413c496b15b8c4b76ffabe9797c1
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoRefactoring of StackSettings to extend StackConfig 29/47429/2
spisarski [Fri, 17 Nov 2017 18:52:01 +0000 (11:52 -0700)]
Refactoring of StackSettings to extend StackConfig

StackSettings and heat_utils have a runtime cyclical
dependency. This patch reduces this dependency and
deprecates the StackSettings class.

JIRA: SNAPS-225

Change-Id: I8dc7a4d80efce93452908563730babf14c17e615
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoRefactoring of RouterSettings to extend RouterConfig 25/47425/2
spisarski [Fri, 17 Nov 2017 16:49:52 +0000 (09:49 -0700)]
Refactoring of RouterSettings to extend RouterConfig

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>
6 years agoRefactoring of UserSettings to extend UserConfig 23/47423/2
spisarski [Fri, 17 Nov 2017 16:25:33 +0000 (09:25 -0700)]
Refactoring of UserSettings to extend UserConfig

UserSettings and keystone_utils have a runtime cyclical
dependency. This patch reduces this dependency and
deprecates the UserSettings class.

JIRA: SNAPS-226

Change-Id: Ifcc2a029463780e963b1afcf1de31baf9edded40
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoRefactoring of ProjectSettings to extend ProjectConfig 21/47421/2
spisarski [Fri, 17 Nov 2017 16:02:27 +0000 (09:02 -0700)]
Refactoring of ProjectSettings to extend ProjectConfig

ProjectSettings and keystone_utils have a runtime cyclical
dependency. This patch reduces this dependency and
deprecates the ProjectSettings class.

JIRA: SNAPS-221

Change-Id: I9e39f09fb8bb03dbd725f44b7256bacb05f26afc
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoRefactoring of KeypairSettings to extend KeypairConfig 19/47419/2
spisarski [Fri, 17 Nov 2017 15:35:45 +0000 (08:35 -0700)]
Refactoring of KeypairSettings to extend KeypairConfig

KeypairSettings and glance_utils have a runtime cyclical
dependency. This patch reduces this dependency and
deprecates the KeypairSettings class.

JIRA: SNAPS-219

Change-Id: I92f51ecb77238444697e922c8f089e78d1c643aa
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoRefactoring of FlavorSettings to extend FlavorConfig 83/47383/2
spisarski [Fri, 17 Nov 2017 01:26:13 +0000 (18:26 -0700)]
Refactoring of FlavorSettings to extend FlavorConfig

FlavorSettings and glance_utils have a runtime cyclical
dependency. This patch reduces this dependency and
deprecates the FlavorSettings class.

JIRA: SNAPS-216

Change-Id: Ie9532fcbe16377d4ab608bdacd1982c3c6628fe9
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoRefactoring of ImageSettings to extend ImageConfig 77/47377/1
spisarski [Thu, 16 Nov 2017 23:07:47 +0000 (16:07 -0700)]
Refactoring of ImageSettings to extend ImageConfig

ImageSettings and glance_utils have a runtime cyclical
dependency. This patch reduces this dependency and
deprecates the ImageSettings class.

JIRA: SNAPS-217

Change-Id: I09f34531366f2a5bd3202c9cbbdef878b2542abe
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoSupporting the protocol string value of 'any' for security group rules. 69/47369/1
spisarski [Thu, 16 Nov 2017 17:51:30 +0000 (10:51 -0700)]
Supporting the protocol string value of 'any' for security group rules.

This issue had been found by Stuart Mackie when using OpenContrail.

Change-Id: I5b57773e19c20028ac736521d461d49341c78cb0
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMinor copy/paste logging value fixes. 51/47351/1
spisarski [Thu, 16 Nov 2017 16:35:43 +0000 (09:35 -0700)]
Minor copy/paste logging value fixes.

Change-Id: I729265575583eec7fb7adc1fc49c6d91c06ad603
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoUpdated from global requirements 65/47265/2
Cédric Ollivier [Wed, 15 Nov 2017 17:28:39 +0000 (18:28 +0100)]
Updated from global requirements

Change-Id: I9fa229d0216b90f7619d1fe5e9f5c35be8899d19
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
6 years agoDeleting files created when obtaining keypair settings from heat. 97/46997/1
spisarski [Thu, 9 Nov 2017 22:07:15 +0000 (15:07 -0700)]
Deleting files created when obtaining keypair settings from heat.

When Heat creates a keypair and SNAPS-OO attempts to generate a
KeypairSettings object, the private key is getting stored into
a file that was not getting cleaned up in some of the tests.

JIRA: SNAPS-177

Change-Id: I50759a74efbd1d0df4de0780da43b9e56432d28c
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Initial patch to begin adding support for Magnum."
Steven Pisarski [Thu, 9 Nov 2017 17:46:41 +0000 (17:46 +0000)]
Merge "Initial patch to begin adding support for Magnum."

6 years agoInitial patch to begin adding support for Magnum. 91/46891/3
spisarski [Wed, 8 Nov 2017 19:53:14 +0000 (12:53 -0700)]
Initial patch to begin adding support for Magnum.

JIRA: SNAPS-212

Change-Id: I5f72fe9c28fe5cdd61546eee828becd034f8aff9
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Apply upper-constraints when testing SNAPS"
Steven Pisarski [Thu, 9 Nov 2017 15:55:58 +0000 (15:55 +0000)]
Merge "Apply upper-constraints when testing SNAPS"

6 years agoApply upper-constraints when testing SNAPS 25/46925/1
Cédric Ollivier [Thu, 9 Nov 2017 08:20:29 +0000 (09:20 +0100)]
Apply upper-constraints when testing SNAPS

It conforms with OpenStack rules [1] and enforces the same testing
env over the OPNFV projects [2].

[1] https://wiki.openstack.org/wiki/Requirements
[2] https://wiki.opnfv.org/display/functest/Requirements+management

Change-Id: Iad277b305dbb6c9e96894f5809edcb27a750e418
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>