143 Commits

Author SHA1 Message Date
Daniel Gonzalez
9ec41c0397 Replace tempest-lib with tempest.lib
tempest-lib is deprecated, so replace it with tempest.lib.

Co-Authored-By: Sheel Rana <ranasheel2000@gmail.com>

Change-Id: I0495eba110bb7581623fbcf49dc63a27e9cb6d64
Closes-Bug: #1553047
2016-04-29 08:33:45 +00:00
Richard Theis
27024d70af Support quota show for current project
The "os quota show" command "<project/class>" argument is now
optional. If not specified, the user's current project is used.
This allows non-admin users to show quotas for their current
project.

Change-Id: I602d4cc09c9d29ce84271eff78137f8810cb1a47
Closes-Bug: #1572733
2016-04-21 11:33:24 -05:00
Jenkins
98a0fba3c1 Merge "Update keypair tests" 2016-04-20 19:40:44 +00:00
Jenkins
eb522fbb5e Merge "Update tests for server" 2016-04-20 16:11:39 +00:00
Kyrylo Romanenko
0e8c78c91a Update tests for server
Make testcases separate instances of test class.
Use setUp with addCleanup methods for every test case.
Add more descriptive docstrings for tests.

Closes-Bug: #1483422
Partial-Bug: #1566962
Change-Id: I1a16b5bad1dafd19fd7dc94794c0bd4587b7f516
2016-04-20 05:20:13 +00:00
Kyrylo Romanenko
ff62c832b5 Update keypair tests
Make testcases separate instances of test class.
Use setUp with addCleanup methods for every test case.
Add negative test cases.

Closes-Bug: #1564480
Change-Id: I5d8fd2a238e6cf0584777eb0d24dfcaed4133ee1
2016-04-19 15:10:30 +03:00
Kyrylo Romanenko
c95d68eaea Deduplicate CLI output parser code in test.py
Use methods from tempest-lib.cli.output_parser.

Change-Id: I0655141a0ef967675e41b1da49cf999da3382018
2016-04-19 05:20:23 +00:00
Jirayut Nimsaeng
e128370676 Fix wrong attribute name and add functional test for --snapshot
Change-Id: I91f2091ef06a55bcf5373d1beeea2dd81e9f1334
Closes-Bug: #1567895
2016-04-15 16:13:02 +00:00
Jenkins
ef68f23de3 Merge "Add network options to security group rule create" 2016-04-14 19:55:54 +00:00
Jenkins
e1305185d3 Merge "Prefer assertEqual/assertIn over assertOutput/assertInOutput" 2016-04-14 19:55:26 +00:00
Kyrylo Romanenko
573bb6b941 Use CommandFailed exception from tempest_lib
Remove exceptions.py from functional/common.
Import exception with the same code from the tempest_lib to tests.

Change-Id: Ifaa658209c18dd608836079f57ed18fcf10fb84e
2016-04-13 19:09:07 +03:00
Richard Theis
3a3f33b926 Add network options to security group rule create
Add the following network options to the "os security group rule"
command:
  (1) --ingress and --egress
  (2) --ethertype
These options enable egress and IPv6 security group rules for
Network v2.

Change-Id: Ie30b5e95f94e0c087b0ce81e518de72d2dda25ad
Partial-Bug: #1519512
Implements: blueprint neutron-client
2016-04-11 09:49:21 -05:00
Jenkins
870fa2f2a2 Merge "Correct addCleanup use in functests" 2016-04-07 16:32:07 +00:00
Cedric Brandily
b13ec98467 Prefer assertEqual/assertIn over assertOutput/assertInOutput
functional.common.tests module defines:

 * assertOutput (similar to assertEqual)
 * assertInOutput (similar to assertIn)

in order to allow the usage of assertions in testcase classmethods but
there is no reason to use them in testcase instancemethods at least
because they raise Exception instances instead of AssertionError
instances.

Change-Id: I9ffcaf9c6e6a1ff5df6ea2d79be3fb4496db4b85
2016-04-06 20:59:59 +02:00
Cedric Brandily
e2e9c49cd9 Correct addCleanup use in functests
This change replaces in many identity functests the pattern:

 raw_resource = create_resource(...)
 check(raw_resource)
 self.addCleanup(delete_resource, ...)
 ...

by the pattern:

 raw_resource = create_resource(...)
 self.addCleanup(delete_resource, ...)
 check(raw_resource)
 ...

which ensures that cleanup is defined and called after the test even if
check(resource) fails.

Change-Id: I4da541b7552d06eaffafda446e389bb552422cda
2016-04-06 20:43:21 +02:00
Cedric Brandily
3c82c0e62e Improve tmpfile cleanup in functests
This change replaces when possible homemade temporary file management by
tempfile.NamedTemporaryFile[1][2] and defines only when needed a cleanup
for a temporary file[2].

[1] functional/tests/compute/v2/test_keypair.py
[2] functional/tests/object/v1/test_object.py

Change-Id: I728ab96381ca9f3fd1f899dd50e5ceb5e97b9397
2016-04-06 00:40:44 +02:00
Cedric Brandily
139a45bb71 Remove unused method cleanup_tmpfile
This change removes unused cleanup_tmpfile method from functests code.

Change-Id: I5d8e7edb0e50e94a5a469ce393d411b390b4db34
2016-04-06 00:40:44 +02:00
Jenkins
f48f9398b8 Merge "Add fixed keypair create functional test" 2016-03-31 02:47:00 +00:00
Dean Troyer
029654b9a8 Add fixed keypair create functional test
This adds a test case to exercise the --public-key option of
the 'keypair create' command.  It is a follow-on to
I7a299a542d9df543bff43d3ea1e7907fc8c5f640 that fixed a key file
read bug.

Change-Id: Id78c1c7ece02f619aca69dc397185fc426b92306
2016-03-30 15:58:42 -05:00
Jenkins
0a760e2d87 Merge "Added functional tests for 'service provider' v3 commands" 2016-03-28 20:54:59 +00:00
Kristi Nikolla
add0e10026 Added functional tests for 'service provider' v3 commands
'identity provider' commands had functional tests but 'service
provider' commands did not. Added the tests in a similar way to
how it is done it test_idp.

Change-Id: Id4b24ef7d34db65c6b0260c89327ec9be683284d
2016-03-28 10:06:35 -04:00
Jenkins
ef1faf7792 Merge "Subnet: Add "subnet set" command using SDK" 2016-03-25 15:47:15 +00:00
reedip
2b95e363d3 Subnet: Add "subnet set" command using SDK
This patch adds "subnet set" command to osc using sdk.

Implements: blueprint neutron-client

Closes-bug: #1542363

Change-Id: Id3b7f4b9190b4d73ca3ae423321a65f94a6da62e
2016-03-24 02:21:40 +00:00
Jenkins
98dc781e94 Merge "Remove superfluous variable assignment statements" 2016-03-21 21:33:06 +00:00
Kyrylo Romanenko
526f2f9f77 Remove superfluous variable assignment statements
wait and interval are already defaulted in the function signature

Change-Id: I66317a24f8327c464343ac13fc0126c34915eeda
2016-03-21 19:32:11 +00:00
Kyrylo Romanenko
0a65e8df70 Style fix for one line docstring according to flake8
Change-Id: I639819a5b1d8a476cdd8b340b8c339754f471048
2016-03-21 18:32:44 +02:00
Kyrylo Romanenko
89182c4825 Functional tests for openstackclient help messages
Add tests for list and description for Server commands:
 - Check server commands in main help message.
 - Check list of server-related commands only.
Commands:
  server add security group,
  server add volume,
  server create,
  server delete,
  server dump create,
  server image create,
  server list,
  server lock,
  server migrate,
  server pause,
  server reboot,
  server rebuild,
  server remove security group,
  server remove volume,
  server rescue,
  server resize,
  server resume,
  server set,
  server shelve,
  server show,
  server ssh,
  server start,
  server stop,
  server suspend,
  server unlock,
  server unpause,
  server unrescue,
  server unset,
  server unshelve.

Change-Id: Ib4bf9ab0264fb482d36cf5688c0f939bcd2cb6d8
2016-03-18 18:28:24 +02:00
Jenkins
9447a0e2c7 Merge "Add subnet functional tests" 2016-03-14 16:10:03 +00:00
Jenkins
4bb48c088d Merge "Add subnet pool functional tests" 2016-03-10 00:38:33 +00:00
Richard Theis
87d90f3e53 Add subnet pool functional tests
Add functional tests for "os subnet pool" commands.

Change-Id: I51ffabcdb4d0f8608cc847aae298c8cbfd1f6a3d
Depends-On: I9150797c8cfa794d5264ad07965aa967d9a8f5bc
Depends-On: I65bd71e0f54f2f65acefbc542df67a1b1ec26397
Related-Bug: #1544586
Related-Bug: #1544587
Related-Bug: #1544589
Related-Bug: #1544590
Related-Bug: #1544591
Partially-Implements: blueprint neutron-client
2016-03-09 11:30:06 -06:00
Richard Theis
9fcbd0ad4b Add port functional tests
Add functional tests for "os port" commands.

Change-Id: I162eff6abacd9ffdde369647491ae472b604c692
Depends-On: I2bea508e11290284aa64b1ab548a0bb61e7290d3
Partial-Bug: #1519909
Partially-Implements: blueprint neutron-client
2016-03-08 10:02:17 -06:00
Richard Theis
bf2dbf3256 Add subnet functional tests
Add functional tests for "os subnet" commands.

Change-Id: Ie80763334f2fb4099b3e549256576d71cc213c07
Depends-On: Ia6120b8dccf2ee83dc89b3f496f7180d4dc5199a
Related-Bug: #1523258
Related-Bug: #1542359
Related-Bug: #1542362
Related-Bug: #1542364
Related-Bug: #1542363
Partially-Implements: blueprint neutron-client
2016-03-04 08:12:01 -06:00
Richard Theis
8cf28a34ab Fix test_aggregate functional test
Nova API validation changes [1] appear to have broken the
'os aggregate create' and 'nova aggregate-create' commands when
an availability zone name is not specified. This patch set updates
the test_aggregate functional test to set the availability zone
name in order to unblock the osc gate while nova investigates
the issue.

[1] https://review.openstack.org/#/c/281143/

Change-Id: I00b497be61c4bc4bc467c66c1e49b2e0636ab841
Related-Bug: #1541691
2016-03-03 12:32:09 -06:00
Tang Chen
ba826fa04f Make SetAggregate inherit from cliff.Command
set/unset comamnd classes should inherit from cliff.Command class.

Also, this patch adds functional tests for aggregate.

And also, use utils.format_dict() to format the output of the
properties dict.

Change-Id: Idb50bef8990da95666960e2414dfd7c9be234bba
Partial-bug: #1519503
Closes-Bug: 1546065
2016-02-27 03:50:47 +08:00
Tang Chen
9c91c1df41 Make SetAgent inherit from cliff.Command
set/unset command classes should inherit from cliff.Command class.

Also, this patch adds functional tests for compute agent.

Change-Id: I25eafffd1167f82aa0d430628c22dee7516b1e19
Partial-Bug: 1546065
2016-02-27 03:48:11 +08:00
Tang Chen
859bfaf875 Make SetSecurityGroup inherit from cliff.Command
set/unset comamnd classes should inherit from cliff.Command class.

Change-Id: Ie28711ac8823dc9eb13cf83877864ca436b928bc
Partial-Bug: 1546065
2016-02-27 03:47:57 +08:00
Tang Chen
f37eda3a27 Make SetFlavor and UnsetFlavor inherit from cliff.Command
set/unset comamnd classes should inherit from cliff.Command class.

Change-Id: I54e5608ac0768d7d94b7f7d516ea1948daefdc1b
Partial-Bug: 1546065
2016-02-27 03:46:30 +08:00
Jenkins
277c16c8b7 Merge "Defaults are ignored with flake8" 2016-02-26 01:59:47 +00:00
Jenkins
c2f5945ef6 Merge "Add "security group rule show" command" 2016-02-23 18:02:56 +00:00
Tom Cocozzello
3d7a26bdec Defaults are ignored with flake8
If “ignore” is not set under flake8 in the tox.ini
file there there are defaults set to be ignored.

The depended patch fixes many of the problems.

Change-Id: Ieed2fe1c4654e201d3fe6d40ef93e247ee736f8b
Doc: http://flake8.readthedocs.org/en/latest/config.html#default
Depends-On: I935ab48e7c5bac5f88ecdb3a05f73fb44fc9f41d
Closes-Bug: #1548910
2016-02-23 11:08:36 -06:00
Richard Theis
dccde70c57 Add "security group rule show" command
Add the "os security group rule show" command which will use
the SDK when neutron is enabled, and use the nova client when
nova network is enabled.

Change-Id: I41efaa4468ec15e4e86d74144cc72edc25a29024
Partial-Bug: #1519512
Implements: blueprint neutron-client
2016-02-23 15:27:06 +00:00
Jenkins
db4d73d8c8 Merge "Add functional tests for "volume" commands v2" 2016-02-23 02:49:57 +00:00
Tang Chen
acc0297fa6 Add functional tests for "volume" commands v2
The tests for v2 "volume" commands are quite similar to v1.

This patch also map 'metadata' to 'properties', 'volume_type' to 'type'
to align to the v1 output.

Change-Id: Icf2c5463b186fc78c890ccd96453090c4a2c2eb6
Partial-bug: #1519503
2016-02-21 09:10:15 +08:00
Tang Chen
86cae7e170 Add functional tests for "image" command v2
The tests for image v2 are quite similar to the tests for v1.
The only difference things are:
1. v2 "image set" command only allows to change the disk format
   for a queued image
2. v2 "image show" command output is different from v1

Change-Id: Ieb6bec7467887aab567743153ea3181afa49537d
2016-02-21 08:25:27 +08:00
Jenkins
c8753808a2 Merge "Refactor security group functional tests" 2016-02-15 20:46:51 +00:00
Richard Theis
ea0b8f9162 Add quota functional tests
Add functional tests for "os quota" commands.

Change-Id: I0f5939bf4ce553174c9b7ce55bdb3dce0506c409
Related-Bug: #1528249
Partially-Implements: blueprint neutron-client
2016-02-12 12:52:40 -06:00
Richard Theis
7d6d23d378 Fix identity test_role functional tests
A recent keystone change [1] resulted in the domain_id field
being included when showing a role.

[1] 407eabde41

Change-Id: I344f4d727f2a16217c075ad8b8393c1e0a233c2e
Closes-Bug: #1544547
2016-02-11 07:30:56 -06:00
Jenkins
794c2a1738 Merge "Add functional tests for snapshots" 2016-02-05 22:50:01 +00:00
TerryHowe
514a168656 Add recursive object delete for containers
Change-Id: Ib291e79864c218464e842a08efd3742193ba5ff0
2016-02-05 11:18:46 -07:00
Richard Theis
a836023411 Refactor security group functional tests
Moved the functional tests for "os security group" and
"os security group rule" from the compute to the network
directory to align with the refactoring to the commands.

Change-Id: Ief6ab17775c6d7e3bef58d9fa025d9dd520b7370
Partial-Bug: #1519511
Partial-Bug: #1519512
Related-to: blueprint neutron-client
2016-02-05 09:54:58 -06:00