snaps.git
6 years agoAdded support for using '~' for SSH key location. 27/37027/1
spisarski [Thu, 6 Jul 2017 17:58:52 +0000 (11:58 -0600)]
Added support for using '~' for SSH key location.

While testing changes, fixed problems found with querying for
floating IPs which also required adding network data to the
VMInst domain object.

JIRA: SNAPS-85

Change-Id: I0ecf3a6885ce84fe14c4a6db09269c56dc0ad9fc
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMaking test user password dynamic for testing against secure pods. 81/36981/1
spisarski [Wed, 5 Jul 2017 17:35:13 +0000 (11:35 -0600)]
Making test user password dynamic for testing against secure pods.

Change-Id: I7c281062fc89a2ff4721e6bee9e90042c59273c5
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Refactor OSCreds to leverage kwargs instead of named parameters."
Steven Pisarski [Wed, 5 Jul 2017 17:08:43 +0000 (17:08 +0000)]
Merge "Refactor OSCreds to leverage kwargs instead of named parameters."

6 years agoRefactor OSCreds to leverage kwargs instead of named parameters. 63/36663/7
spisarski [Wed, 28 Jun 2017 15:20:13 +0000 (09:20 -0600)]
Refactor OSCreds to leverage kwargs instead of named parameters.

JIRA: SNAPS-109

Change-Id: I423ede964cce9fc3b4e5b27f1e8f0dd7603d9ff1
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Add a warning of keypair creation"
Steven Pisarski [Wed, 5 Jul 2017 13:57:58 +0000 (13:57 +0000)]
Merge "Add a warning of keypair creation"

6 years agoAdd a warning of keypair creation 31/36831/2
boucherv [Sun, 2 Jul 2017 14:26:57 +0000 (16:26 +0200)]
Add a warning of keypair creation

Put a warning if the public key already exist in OpenStack
but the private key file is not found

Change-Id: Ie2dc5b9f6a6abb0831e1826130d5c283cf3f34ec
Signed-off-by: boucherv <valentin.boucher@orange.com>
6 years agoSync requirements.txt with OpenStack (novaclient) 91/36791/1
Cédric Ollivier [Fri, 30 Jun 2017 09:03:55 +0000 (11:03 +0200)]
Sync requirements.txt with OpenStack (novaclient)

It completes "Use neutron to create floating IPs" [1]

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

Change-Id: I11c591d86509fa41b4b0c4a7a758ff0ceed321c2
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
6 years agoFixed tests to delete security groups. 53/36753/1
spisarski [Thu, 29 Jun 2017 21:25:06 +0000 (15:25 -0600)]
Fixed tests to delete security groups.

Change-Id: I140618a310bae050bea29df665b98881c6052980
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Changed credentials for deploying heat templates."
Steven Pisarski [Thu, 29 Jun 2017 17:21:44 +0000 (17:21 +0000)]
Merge "Changed credentials for deploying heat templates."

6 years agoChanged credentials for deploying heat templates. 41/36741/1
spisarski [Thu, 29 Jun 2017 17:15:37 +0000 (11:15 -0600)]
Changed credentials for deploying heat templates.

The old credentials had been working on other pods but are not working
with our latest deployed by Kolla. This change does not affect any of
the functionality included in the tests. It simply takes the administrative
user credentials and changes the project to the newly created one.

Change-Id: I76c605797b68f902f2ee5c679bd5b8a50c48a501
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Fixed test to not download images when configured with a disk file path."
Steven Pisarski [Thu, 29 Jun 2017 14:06:51 +0000 (14:06 +0000)]
Merge "Fixed test to not download images when configured with a disk file path."

6 years agoFIX mistake in import keypair 21/36721/1
boucherv [Thu, 29 Jun 2017 12:39:41 +0000 (14:39 +0200)]
FIX mistake in import keypair

Change-Id: I3d0a3111efcb4200c9b867663a45c07a3b47c09d
Signed-off-by: boucherv <valentin.boucher@orange.com>
6 years agoFixed test to not download images when configured with a disk file path. 65/36665/1
spisarski [Wed, 28 Jun 2017 15:56:48 +0000 (09:56 -0600)]
Fixed test to not download images when configured with a disk file path.

JIRA: FUNCTEST-809

Change-Id: I078578ba9881eeeb8942d22cb342e87e17f6f879
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded offline test support to NovaUtilsInstanceTests missed initially. 05/36605/1
spisarski [Tue, 27 Jun 2017 18:19:30 +0000 (12:19 -0600)]
Added offline test support to NovaUtilsInstanceTests missed initially.

JIRA: FUNCTEST-809

Change-Id: I3a54af6fc64f93a72059d0ff205024fa765ceb52
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoEnable snaps work using public endpoint 41/36441/3
Linda Wang [Sat, 24 Jun 2017 07:42:20 +0000 (07:42 +0000)]
Enable snaps work using public endpoint

When functest is not run on jumpserver but on other external host without
admin network, snaps failed to connect the admin endpoint. So running
snaps tests using public endpoint should be allowed.

JIRA: SNAPS-110

Change-Id: I8ca8d8c48330b5f427568d3d5fe942f6f2ca9ea9
Signed-off-by: Linda Wang <wangwulin@huawei.com>
6 years agoUse neutron to create floating IPs. 89/36389/4
spisarski [Thu, 22 Jun 2017 18:43:09 +0000 (12:43 -0600)]
Use neutron to create floating IPs.

This patch moves the floating IP creation out of nova and into neutron.
Other changes include the use of domain objects for VM and Floating IP
instances, addition of new nova_utils tests to exercise the create
server functionality, and more PEP8 compliance.

JIRA: SNAPS-92

Change-Id: I16c12b26b56008901633e90ae307586ad2045f9b
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoEnable https for Openstack in Snaps 21/36221/7
Linda Wang [Tue, 20 Jun 2017 06:31:29 +0000 (06:31 +0000)]
Enable https for Openstack in Snaps

When running in https environment, snaps should provide two options:
1. To support certification verify when https certification file is provided;
2. To disable server certificate verification without cert file.

JIRA: SNAPS-84

Change-Id: I5a9094238db5c8017cc8b80e3353adc6e793b552
Signed-off-by: Linda Wang <wangwulin@huawei.com>
6 years agoFixed launcher app to support new settings kwargs. 21/36321/1
spisarski [Wed, 21 Jun 2017 17:38:35 +0000 (11:38 -0600)]
Fixed launcher app to support new settings kwargs.

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>
6 years agoMerge "Changes UserSettings constructor to use kwargs."
Steven Pisarski [Wed, 21 Jun 2017 13:36:03 +0000 (13:36 +0000)]
Merge "Changes UserSettings constructor to use kwargs."

6 years agoMerge "Changes StackSettings constructor to use kwargs."
Steven Pisarski [Wed, 21 Jun 2017 13:35:56 +0000 (13:35 +0000)]
Merge "Changes StackSettings constructor to use kwargs."

6 years agoMerge "Changes SecurityGroupSettings & SecurityGroupRuleSettings constructor to use...
Steven Pisarski [Wed, 21 Jun 2017 13:35:49 +0000 (13:35 +0000)]
Merge "Changes SecurityGroupSettings & SecurityGroupRuleSettings constructor to use kwargs."

6 years agoMerge "Changes to RouterSettings constructors to use kwargs."
Steven Pisarski [Wed, 21 Jun 2017 13:35:43 +0000 (13:35 +0000)]
Merge "Changes to RouterSettings constructors to use kwargs."

6 years agoMerge "Changes to ProjectSettings constructors to use kwargs."
Steven Pisarski [Wed, 21 Jun 2017 13:35:36 +0000 (13:35 +0000)]
Merge "Changes to ProjectSettings constructors to use kwargs."

6 years agoMerge "Changes to NetworkSettings, SubnetSettings, and PortSettings constructors...
Steven Pisarski [Wed, 21 Jun 2017 13:35:29 +0000 (13:35 +0000)]
Merge "Changes to NetworkSettings, SubnetSettings, and PortSettings constructors to use kwargs."

6 years agoMerge "Changes to KeypairSettings constructor to use kwargs."
Steven Pisarski [Wed, 21 Jun 2017 13:35:22 +0000 (13:35 +0000)]
Merge "Changes to KeypairSettings constructor to use kwargs."

6 years agoMerge "Changes to VMInstanceSettings and FloatingIPSettings constructors."
Steven Pisarski [Wed, 21 Jun 2017 13:35:11 +0000 (13:35 +0000)]
Merge "Changes to VMInstanceSettings and FloatingIPSettings constructors."

6 years agoMerge "Changes ImageSettings constructor to use kwargs."
Steven Pisarski [Wed, 21 Jun 2017 13:35:01 +0000 (13:35 +0000)]
Merge "Changes ImageSettings constructor to use kwargs."

6 years agoMerge "Changes FlavorSettings constructor to use kwargs."
Steven Pisarski [Wed, 21 Jun 2017 13:34:51 +0000 (13:34 +0000)]
Merge "Changes FlavorSettings constructor to use kwargs."

6 years agoChanges UserSettings constructor to use kwargs. 71/36271/1
spisarski [Tue, 20 Jun 2017 19:14:35 +0000 (13:14 -0600)]
Changes UserSettings constructor to use kwargs.

And changed line lengths to 79 for pep8.

JIRA: SNAPS-104

Change-Id: I04413ccd783b5ccdac0f6d8e76780e728f765962
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoChanges StackSettings constructor to use kwargs. 69/36269/1
spisarski [Tue, 20 Jun 2017 19:07:49 +0000 (13:07 -0600)]
Changes StackSettings constructor to use kwargs.

And changed line lengths to 79 for pep8.

JIRA: SNAPS-103

Change-Id: Iacc3a42cbf3bebe7336d17fc4a4574590f15b93a
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoChanges SecurityGroupSettings & SecurityGroupRuleSettings constructor to use kwargs. 67/36267/1
spisarski [Tue, 20 Jun 2017 18:57:02 +0000 (12:57 -0600)]
Changes SecurityGroupSettings & SecurityGroupRuleSettings constructor to use kwargs.

And changed line lengths to 79 for pep8.

JIRA: SNAPS-102

Change-Id: Ifa878ba01694eaa17ee05cea5dbbe9bc8bde3cd0
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoChanges to RouterSettings constructors to use kwargs. 63/36263/1
spisarski [Tue, 20 Jun 2017 16:32:13 +0000 (10:32 -0600)]
Changes to RouterSettings constructors to use kwargs.

And changed line lengths to 79 for pep8

JIRA: SNAPS-101

Change-Id: I2b63e4130644ad422aa1f81bcf2627e97d97c035
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoChanges to ProjectSettings constructors to use kwargs. 57/36257/1
spisarski [Tue, 20 Jun 2017 16:04:04 +0000 (10:04 -0600)]
Changes to ProjectSettings constructors to use kwargs.

And changed line lengths to 79 for pep8

Change-Id: I3ea32e221608d759466973071dd86f9037ad2996
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoChanges to NetworkSettings, SubnetSettings, and PortSettings constructors to use... 55/36255/1
spisarski [Tue, 20 Jun 2017 15:51:56 +0000 (09:51 -0600)]
Changes to NetworkSettings, SubnetSettings, and PortSettings constructors to use kwargs.

And changed line lengths to 79 for pep8

JIRA: SNAPS-99

Change-Id: Iedb3ff663dc9d71ce774b5c4c1d0bef601f792da
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoChanges to KeypairSettings constructor to use kwargs. 47/36247/1
spisarski [Tue, 20 Jun 2017 14:47:27 +0000 (08:47 -0600)]
Changes to KeypairSettings constructor to use kwargs.

And changed line lengths to 79 for pep8.

JIRA: SNAPS-98

Change-Id: I01f7f459bc46ed818d75d30f8bea7b1e09b5b376
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoChanges to VMInstanceSettings and FloatingIPSettings constructors. 43/36243/1
spisarski [Tue, 20 Jun 2017 14:33:57 +0000 (08:33 -0600)]
Changes to VMInstanceSettings and FloatingIPSettings constructors.

Removed named parameters and replaced with kwargs.

JIRA: SNAPS-97

Change-Id: I9e313c342a8fd5a99f3ce6e7274406f8a29b8c8b
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoChanges ImageSettings constructor to use kwargs. 07/36207/1
spisarski [Mon, 19 Jun 2017 19:27:45 +0000 (13:27 -0600)]
Changes ImageSettings constructor to use kwargs.

And changed line lengths to 79 for pep8.

JIRA: SNAPS-96

Change-Id: Ibda4954a4d9a6be4b94a7b2de61d03b25afff8db
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Missed image config for configuring multiple NICs test"
Steven Pisarski [Mon, 19 Jun 2017 16:41:23 +0000 (16:41 +0000)]
Merge "Missed image config for configuring multiple NICs test"

6 years agoChanges FlavorSettings constructor to use kwargs. 03/36203/1
spisarski [Mon, 19 Jun 2017 16:39:48 +0000 (10:39 -0600)]
Changes FlavorSettings constructor to use kwargs.

And changed line lengths to 79 for pep8.

JIRA: SNAPS-95

Change-Id: Icd3ac79c66049b596c14273abb146d957d6e4e67
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Ignore several files"
Steven Pisarski [Mon, 19 Jun 2017 16:18:50 +0000 (16:18 +0000)]
Merge "Ignore several files"

6 years agoMerge "Leverage on pbr (Python Build Reasonableness)"
Steven Pisarski [Wed, 14 Jun 2017 22:14:34 +0000 (22:14 +0000)]
Merge "Leverage on pbr (Python Build Reasonableness)"

6 years agoIgnore several files 71/36071/3
Cédric Ollivier [Wed, 14 Jun 2017 02:34:54 +0000 (04:34 +0200)]
Ignore several files

Change-Id: Ie00d9a995e1cf96f2754d30fc0a77f3254c811c7
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
6 years agoLeverage on pbr (Python Build Reasonableness) 69/36069/4
Cédric Ollivier [Wed, 14 Jun 2017 02:31:14 +0000 (04:31 +0200)]
Leverage on pbr (Python Build Reasonableness)

It also updates requirements according to OpenStack stable/ocata
except for nova client version as snaps needs nova support of
floating IP which has been removed in pike [1] (8.0.0 [2]).

It must be reverted to >=6.0.0,!=7.0.0 as soon as snaps calls the
related neutron commands.

[1] https://github.com/openstack/python-novaclient/blob/master/releasenotes/notes/pike-rm-deprecated-net-272aeb62b329a5bc.yaml
[2] https://docs.openstack.org/releasenotes/python-novaclient/unreleased.html

Change-Id: Iaa0285471da5f2f73cbfef038c9902e1c39fa009
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
6 years agoNeed to move file resources required by tests. 79/36079/1
spisarski [Wed, 14 Jun 2017 03:22:33 +0000 (11:22 +0800)]
Need to move file resources required by tests.

Functest was not installing the heat resource files required
by the snaps tests being run by Functest as the heat template
file used by the tests as it was under the repository's root
directory which is causing tests to fail.

Change-Id: I214d2e61e92f7dfa2e9859dded1e7ea08706314d
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoChanged logic to return only active availability zones. 21/36021/1
spisarski [Tue, 13 Jun 2017 01:18:57 +0000 (09:18 +0800)]
Changed logic to return only active availability zones.

Change-Id: I75d92976f4486933d432a8066159dbb66c12daf5
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoCreate download directory if not exists before downloading image file. 19/36019/1
spisarski [Tue, 13 Jun 2017 01:16:18 +0000 (09:16 +0800)]
Create download directory if not exists before downloading image file.

Change-Id: I6d51681d4e0d58b96a00bfeb144d6bfcb8ae04e6
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMissed image config for configuring multiple NICs test 75/35975/1
spisarski [Sun, 11 Jun 2017 07:26:57 +0000 (15:26 +0800)]
Missed image config for configuring multiple NICs test

JIRA: SNAPS-89

Change-Id: I640aee39842272ca8dd6245be10c2fb3a899020e
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoFixed problems found in Functest after implementing offline testing. 73/35973/1
spisarski [Sun, 11 Jun 2017 06:16:37 +0000 (14:16 +0800)]
Fixed problems found in Functest after implementing offline testing.

JIRA: FUNCTEST-809

Change-Id: I5e579b141eb513b0f9db36959014b8f945afe6a0
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoRemoved current working directory logic retrieving test file resources. 93/35893/1
spisarski [Wed, 7 Jun 2017 20:56:00 +0000 (14:56 -0600)]
Removed current working directory logic retrieving test file resources.

Some of the SNAPS tests leverage file resources contained within the
project. These resources were being accessed via relative paths which
required the test clients to ensure that the CWD was the <repo>/snaps
directory. Replaced that logic to leverage the import pkg_resources
making the tests much more flexible and robust.

JIRA: SNAPS-89

Change-Id: Ic9c429ee53e4dd785641e11e1ed4de5aeeab54d1
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoMerge "Added custom security group with ICMP and SSH rules."
Steven Pisarski [Wed, 7 Jun 2017 14:45:09 +0000 (14:45 +0000)]
Merge "Added custom security group with ICMP and SSH rules."

6 years agoAdded custom security group with ICMP and SSH rules. 41/35841/2
spisarski [Tue, 6 Jun 2017 20:45:19 +0000 (14:45 -0600)]
Added custom security group with ICMP and SSH rules.

This was done for all tests exercising floating IPs.
Also added check to all of these tests to ensure the VMs
all have received their private IP address via DHCP.

JIRA: FUNCTEST-834

Change-Id: I88ae2fecc3f8e507641adf24cb65a0583f4db24c
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
6 years agoAdded support for applying Heat Templates 53/35753/3
spisarski [Fri, 2 Jun 2017 21:31:53 +0000 (15:31 -0600)]
Added support for applying Heat Templates

Second patch expanded support to both files and dict() objects.
Third patch exposes new accessor for status and outputs.

JIRA: SNAPS-86

Change-Id: Ie7e8d883b4cc1a08dbe851fc9cbf663396334909
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoFixed RST warning. 83/35683/1
spisarski [Thu, 1 Jun 2017 18:27:03 +0000 (12:27 -0600)]
Fixed RST warning.

Change-Id: I45f6161c51a018d91c9363980d6a6b279532101c
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoRefactor keystone endpoint tests to the proper test class. 81/35681/1
spisarski [Thu, 1 Jun 2017 18:16:50 +0000 (12:16 -0600)]
Refactor keystone endpoint tests to the proper test class.
Also added documentation for those three tests.

Change-Id: I38a728ba9e258a821341621978953e0529a0c1a1
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoUpdated installation documents and fixed problems found during investigation. 67/35367/1
spisarski [Thu, 25 May 2017 14:46:40 +0000 (08:46 -0600)]
Updated installation documents and fixed problems found during investigation.

The code changes are primarily required when the runtime environment is Windows.

JIRA: SNAPS-75

Change-Id: Ia2134861dd96e1d2c4b597f42fb348929e787a51
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoFind packages in setup.py 55/35155/1
Cédric Ollivier [Mon, 22 May 2017 18:14:25 +0000 (20:14 +0200)]
Find packages in setup.py

Change-Id: I73c46d1c9bfaabcd7d2ba793d4c2e8244e549de1
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoMerge "Fixed error in ansible_utils_tests.py and added ansible helper method to the...
Steven Pisarski [Mon, 22 May 2017 13:24:48 +0000 (13:24 +0000)]
Merge "Fixed error in ansible_utils_tests.py and added ansible helper method to the OpenStackVMInstance class."

7 years agoFix typo in setup.py 85/35085/1
Cédric Ollivier [Sat, 20 May 2017 10:50:39 +0000 (12:50 +0200)]
Fix typo in setup.py

It forbids gating in functest.

Change-Id: I3f0b943678ee4af869073b56ca1235da23d98b1a
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
7 years agoFixed error in ansible_utils_tests.py and added ansible helper 63/35063/1
spisarski [Fri, 19 May 2017 17:12:22 +0000 (11:12 -0600)]
Fixed error in ansible_utils_tests.py and added ansible helper
method to the OpenStackVMInstance class.

Test error was due to the image configuration having the incorrect
user applied. The helper method will make it easier for adhoc
ansible playbooks to be applied to running instances.

JIRA: SNAPS-83

Change-Id: I6b229e0adb836dd3d5ea7b468d38d93f880589a2
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoAdd the function of getting endpoint 33/34933/2
Linda Wang [Thu, 18 May 2017 01:53:18 +0000 (01:53 +0000)]
Add the function of getting endpoint

Functest is trying to leverage SNAPS-OO library to replace some
utility functions, in which def get_endpoint is called by testcases
onos, odl, multisite and cloudify_ims.

JIRA: SNAPS-78

Change-Id: Icb2778e0337a5d4246762ac3037773b39d5d554d
Signed-off-by: Linda Wang <wangwulin@huawei.com>
7 years agobugfix: get_security_group_by_id always return first element 83/34883/2
Morgan Richomme [Wed, 17 May 2017 08:29:20 +0000 (10:29 +0200)]
bugfix: get_security_group_by_id always return first element

add check on id before return value
fixed kwarg into the neutron.list_security_groups to the correct one 'id'
added unit test to ensure this function always works as designed

JIRA: SNAPS-82

Change-Id: I965e1dd54fd1efa8c2d7f6efb87c78ab24cca0e5
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
7 years agoAdded support for offline testing 93/34693/2
spisarski [Fri, 12 May 2017 19:59:04 +0000 (13:59 -0600)]
Added support for offline testing

Expanded the image_metadata used by the tests for overriding default
images for not only supporting 3part images but also to support offline
testing as required by Functest.

JIRA: SNAPS-67

Change-Id: I6975e7b51fa879fe984af64402939c465df95184
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoEnsure creators' constructors cannot raise exceptions. 55/34855/1
spisarski [Tue, 16 May 2017 19:57:26 +0000 (13:57 -0600)]
Ensure creators' constructors cannot raise exceptions.

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>
7 years agoMerge "Restricted dependency of the novaclient."
Steven Pisarski [Mon, 8 May 2017 16:21:08 +0000 (16:21 +0000)]
Merge "Restricted dependency of the novaclient."

7 years agoMerge "Modified code to support both Python 2.7 and 3.x"
Steven Pisarski [Mon, 8 May 2017 16:20:32 +0000 (16:20 +0000)]
Merge "Modified code to support both Python 2.7 and 3.x"

7 years agoFixed some redundant dict() key checks that can cause runtime errors. 49/34449/1
spisarski [Mon, 8 May 2017 16:18:55 +0000 (10:18 -0600)]
Fixed some redundant dict() key checks that can cause runtime errors.

Change-Id: I9d05e6cc69526b7424b65e171da1fa4e99e02149
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoModified code to support both Python 2.7 and 3.x 05/34305/3
spisarski [Thu, 4 May 2017 18:43:53 +0000 (12:43 -0600)]
Modified code to support both Python 2.7 and 3.x

* 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>
7 years agoRestricted dependency of the novaclient. 09/34309/1
spisarski [Thu, 4 May 2017 20:14:31 +0000 (14:14 -0600)]
Restricted dependency of the novaclient.

The 8.0.0 version is not backwards compatible with 7.1

JIRA: SNAPS-73

Change-Id: I76f52e0e1e212e1e4053ade6279b1117ab740cde
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoChanged image metadata to support cirros, ubuntu, and centos. 67/34167/2
spisarski [Wed, 3 May 2017 17:47:17 +0000 (11:47 -0600)]
Changed image metadata to support cirros, ubuntu, and centos.

The image metadata that was designed for multi-part form support
did not take into account tests that require ubuntu or centos
tests.

JIRA: SNAPS-76

Change-Id: I95c7b74b8f7d7b78c3842b5e716fd7b466107c9c
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoMerge "Refactored multi-part images."
Steven Pisarski [Wed, 3 May 2017 14:03:04 +0000 (14:03 +0000)]
Merge "Refactored multi-part images."

7 years agoMerge "Matching test_check_vm_ip_dhcp on ip only"
Steven Pisarski [Tue, 2 May 2017 15:58:03 +0000 (15:58 +0000)]
Merge "Matching test_check_vm_ip_dhcp on ip only"

7 years agoMatching test_check_vm_ip_dhcp on ip only 55/34055/2
Dan Radez [Tue, 2 May 2017 14:06:23 +0000 (10:06 -0400)]
Matching test_check_vm_ip_dhcp on ip only

No nee dto look for the string surrounding the ip that's being looked
for in this test. simplifying the code to only look for the ip

Change-Id: I80e6336c58573e5970eafe2608daf7c61e43b717
Signed-off-by: Dan Radez <dradez@redhat.com>
7 years agoMerge "Fixed test for security groups when checking for project/tenant ID"
Steven Pisarski [Thu, 27 Apr 2017 14:33:09 +0000 (14:33 +0000)]
Merge "Fixed test for security groups when checking for project/tenant ID"

7 years agoRefactored multi-part images. 99/33499/3
spisarski [Tue, 18 Apr 2017 18:13:44 +0000 (12:13 -0600)]
Refactored multi-part images.

The logic used for creating multi-part images for the Danube release
was copied all throughout the tests, which was not sustainable.
This patch encapsulates the kernel and ramdisk images within the
same OpenStackImage object as the disk image.

JIRA: SNAPS-59

Change-Id: I45ec0ccc666accb4e768c41e249e6130dc07f6d1
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoFixed issue caused previous patch which did not merge correctly. 29/33929/1
spisarski [Thu, 27 Apr 2017 09:30:10 +0000 (11:30 +0200)]
Fixed issue caused previous patch which did not merge correctly.

JIRA: SNAPS-57

Change-Id: I60e7cf2fea37fc337ac7adc01283476a00aca99c
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoFixed the Glance connection test routines. 89/33789/2
spisarski [Tue, 25 Apr 2017 12:37:24 +0000 (14:37 +0200)]
Fixed the Glance connection test routines.
test_glance_connect_success gave a false positive and
test_glance_connect_fail gave a false negative.
Both were calling incorrect APIs due to copying from the equivalent
nova_utils.py test.

JIRA: SNAPS-57

Change-Id: I1246d535f8bd376c163315dc889ff5bacebb12ec
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoFixed test for security groups when checking for project/tenant ID 57/33857/1
spisarski [Wed, 26 Apr 2017 12:22:59 +0000 (14:22 +0200)]
Fixed test for security groups when checking for project/tenant ID

This problem has only been observed on the WindRiver pod during the
OPNFV Plug/Hackfest

JIRA: SNAPS-72

Change-Id: I59f4c10129007efe11cce7272b6690125057e266
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoAdded support for Glance v2 01/33601/3
spisarski [Thu, 20 Apr 2017 20:15:30 +0000 (14:15 -0600)]
Added support for Glance v2

Updated copyright date on new and edited files to current year.

JIRA: SNAPS-66

Change-Id: I491157d6ced8bd9322f99272fc14e00168faaf29
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoMerge "Run all test suites when none chosen."
Steven Pisarski [Fri, 14 Apr 2017 13:46:39 +0000 (13:46 +0000)]
Merge "Run all test suites when none chosen."

7 years agoRun all test suites when none chosen. 53/33353/1
spisarski [Thu, 13 Apr 2017 16:11:48 +0000 (10:11 -0600)]
Run all test suites when none chosen.

Changed the test_runner.py to run all four suites of tests
when none have been chosen.

JIRA: SNAPS-10

Change-Id: I9f8f543f9aca07d01911bd8812478bf470673575
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoEnsuring each port manipulation test waits for the instance to become active 51/33351/1
spisarski [Thu, 13 Apr 2017 16:04:47 +0000 (10:04 -0600)]
Ensuring each port manipulation test waits for the instance to become active

The problem with OpenStack is that when one attempts to delete an instance
that is still spawning, it can take an inordinate amount of time for OpenStack
to complete the request resulting in artifacts being left.

JIRA: SNAPS-64

Change-Id: I39f33291e650c00a8b5a40cb0051b99b71923acf
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoRefactored SNAPS tests to take in the actual OSCreds object. 35/31435/2
spisarski [Wed, 22 Mar 2017 21:56:54 +0000 (15:56 -0600)]
Refactored SNAPS tests to take in the actual OSCreds object.

The code previously had individual parameters for different
aspects of the credentials. This change not only makes the
method calls easier, but it also helps the logs from becoming
too verbose as each test case was instantiating its own OSCreds
instance.

JIRA: SNAPS-23

Change-Id: I8860e7329b9ec59d78e5977af74f4d3073496f24
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoMerge "Renamed test application and added new command line arguments."
Randy Levensalor [Wed, 12 Apr 2017 20:24:51 +0000 (20:24 +0000)]
Merge "Renamed test application and added new command line arguments."

7 years agoRenamed test application and added new command line arguments. 11/33311/3
spisarski [Wed, 12 Apr 2017 16:44:49 +0000 (10:44 -0600)]
Renamed test application and added new command line arguments.

JIRA: SNAPS-10

Change-Id: I809a93f67ee0931df9601a0095775fe6303bbfbb
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoMerge "Fixed two tests that never had their networks removed on tearDown()"
Randy Levensalor [Tue, 11 Apr 2017 21:40:13 +0000 (21:40 +0000)]
Merge "Fixed two tests that never had their networks removed on tearDown()"

7 years agoFixed two tests that never had their networks removed on tearDown() 73/33273/1
spisarski [Tue, 11 Apr 2017 20:24:07 +0000 (14:24 -0600)]
Fixed two tests that never had their networks removed on tearDown()

JIRA: SNAPS-56

Change-Id: I43d47f59f5b15805dce425f148ec5c990055ca73
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoProblem found while working on FUNCTEST-577 where instances with 07/33207/2
spisarski [Mon, 10 Apr 2017 16:59:55 +0000 (10:59 -0600)]
Problem found while working on FUNCTEST-577 where instances with
security groups need to be active before application.

JIRA: FUNCTEST-577

Change-Id: I0d31b6afe4a378b3be85b335ba5f1568a0b26708
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoMerge "Check for kernel_url and ramdisk_url keys in dict"
Steven Pisarski [Mon, 10 Apr 2017 13:26:27 +0000 (13:26 +0000)]
Merge "Check for kernel_url and ramdisk_url keys in dict"

7 years agoCall to ansible_utils.apply_playbook needed named paramteters. 85/33085/1
spisarski [Thu, 6 Apr 2017 17:36:04 +0000 (11:36 -0600)]
Call to ansible_utils.apply_playbook needed named paramteters.

Change-Id: I4454a0598df4e630a4588f7c0d4af108e8747a46
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoFixed cleanup after failed deploy 97/32297/1
randyl [Wed, 29 Mar 2017 20:31:52 +0000 (14:31 -0600)]
Fixed cleanup after failed deploy

Added exception handling when performing a cleanup after
a failed deploy.

This is a temporay fix, that will not impact FuncTest.

Router and network clean calls will eventually need to be
updated.

JIRA : SNAPS-55

Change-Id: I24d79802f02357015ada20726e170dd5128754f1
Signed-off-by: randyl <r.levensalor@cablelabs.com>
7 years agoCorrecting minor issues with the documentation 95/32295/1
randyl [Wed, 29 Mar 2017 20:25:06 +0000 (14:25 -0600)]
Correcting minor issues with the documentation

Correcting some formatting and minor content changes.

Change-Id: Idf75e8c6985bae9a2df26c54c559a20d46b6ac1f
Signed-off-by: randyl <r.levensalor@cablelabs.com>
7 years agoCheck for kernel_url and ramdisk_url keys in dict 95/31395/3
Catalina Focsa [Wed, 22 Mar 2017 16:07:30 +0000 (17:07 +0100)]
Check for kernel_url and ramdisk_url keys in dict

Need to check if the above keys exist in image_metadata
before checking for their assigned values in case
they are not declared (e.g. obsolete when creating a
one part image)

Change-Id: I22fa259b320a425d6ad030eeb9bf68b4c06b667f
Signed-off-by: Catalina Focsa <catalina.focsa@enea.com>
7 years agoMerge "Add DEBUG logs to SimpleHealthCheck for VM console output."
Steven Pisarski [Fri, 10 Mar 2017 15:56:28 +0000 (15:56 +0000)]
Merge "Add DEBUG logs to SimpleHealthCheck for VM console output."

7 years agoAdd DEBUG logs to SimpleHealthCheck for VM console output. 09/30209/3
spisarski [Thu, 9 Mar 2017 19:10:02 +0000 (12:10 -0700)]
Add DEBUG logs to SimpleHealthCheck for VM console output.

The test in the class SimpleHealthCheck uses the console output
to determine whether or not the VM obtains a DHCP lease which
contains a very image-specific check. When a client changes
the image from what the test was designed for, the console
output can change causing the test to fail unless it is simply
timing out. This patch will output the full console log on
failure or on success when the logger is configured as DEBUG.

JIRA: SNAPS-47

Change-Id: I2041ca1aed8bd1e2fb65932591f4acbd4d3cd720
Signed-off-by: spisarski <s.pisarski@cablelabs.com>
7 years agoreduce instance's memory size 13/30113/3
SerenaFeng [Thu, 9 Mar 2017 05:58:53 +0000 (13:58 +0800)]
reduce instance's memory size

when using snaps to test small OpenStack env(devstack or all-in-one),
testcase  will fail due to not enough memory for a vm. As a
basic test using cirros, only allocating ip and test the connectivity is
needed, 128M should be enough.
the error msg is:

  File "/usr/local/lib/python2.7/dist-packages/novaclient/client.py",
  line 80, in request
      raise exceptions.from_response(resp, body, url, method)
ClientException: Unknown Error (HTTP 504)

Change-Id: Ibfb27018ffd25292bcf80f69e8cb205b2c9c334b
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
7 years agoMerge "Adapt integration tests to use custom image config"
Steven Pisarski [Wed, 8 Mar 2017 14:57:38 +0000 (14:57 +0000)]
Merge "Adapt integration tests to use custom image config"

7 years agoAdapt integration tests to use custom image config 89/29989/2
Cristina Pauna [Tue, 7 Mar 2017 14:52:35 +0000 (16:52 +0200)]
Adapt integration tests to use custom image config

This fix uses the possibility to pass custom imformation about the
image via image_metadata variable. In the integration tests it checks
for this info and creates a 3-part image if the kernel_url and
ramdisk_url are set. The fix also allows the default url to be overriden
as well as passing extra-properties. All the metadata info comes from
the app.

The part in functest where the custom config is set for creating a 3-part
image is https://gerrit.opnfv.org/gerrit/29987

Change-Id: Ib2ad823705dbea68d672514c7c89b150c9c6dc63
Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
7 years agoAdd check that SSH validate returns true 97/29897/1
randyl [Tue, 7 Mar 2017 00:38:46 +0000 (17:38 -0700)]
Add check that SSH validate returns true

The SSH Validate call needs to be checked before passing tests.
test_ssh_client_fip_before_active and test_ssh_client_fip_after_active
run the SSH Verify function, but do not check the return value.

You will see an error in the test log file, but the test will
appear to have passed.

JIRA: SNAPS-45

Added an Assert True test to the SSH Validate return.

Change-Id: Ib86ec38c7b5a64061a1ace4293336e3021c59013
Signed-off-by: randyl <r.levensalor@cablelabs.com>
7 years agoAdapt simple health check to use 3-part image 53/29853/3
Cristina Pauna [Thu, 2 Mar 2017 14:53:17 +0000 (14:53 +0000)]
Adapt simple health check to use 3-part image

This fix adds the possibility to pass custom imformation about the
image via image_metadata variable. In SimpleHealthcheck it checks
for this info and creates a 3-part image if the kernel_url and
ramdisk_url are set. The fix also allows the default url to be
overriden as well as passing extra-properties. All the metadata info
comes from the app.

The part in functest where the custom config is set for creating
a 3-part image is https://gerrit.opnfv.org/gerrit/#/c/29851/

JIRA: ARMBAND-222

Change-Id: I11435d8bab4cf097b4079b6984741869f83aee2b
Signed-off-by: Cristina Pauna <cristina.pauna@enea.com>
7 years agoMerge "Added the ability to give the tests the ability to add in flavor metadata."
Steven Pisarski [Mon, 6 Mar 2017 17:14:37 +0000 (17:14 +0000)]
Merge "Added the ability to give the tests the ability to add in flavor metadata."