314 Commits

Author SHA1 Message Date
Dean Troyer
8d7ee8da0e Fix dynamic names in network functional tests
Move all of the dynamic resource naming in Network functional tests into
setUpClass() methods (if they exist) rather than assigning those names
at load-time.

Change-Id: Ic550ff7d40c2b3ca5128cacccbe331790d6ae340
2017-07-19 16:33:54 -05:00
nidhimittalhada
bca8d57eb3 image-list should support filters 'name','status'
nova api support parameters like 'name', 'server', 'status',
etc in image-list(). So openstackclient should support this too.

DocImpact
Closes-Bug: #1698742
Change-Id: Ice66b409f989e6785aa3b2d42f2fdbf6e23fa0aa
2017-07-12 22:50:17 +00:00
Ankur Gupta
18c532377a Network L3 Router Commands for OSC
Implements: blueprint network-l3-commands

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Ia24d76227e164062e89a74c1621b8acb830b26cf
2017-07-11 08:17:09 +00:00
Jenkins
91cc731187 Merge "Allow objects to be streamed to stdout" 2017-07-06 15:24:31 +00:00
Honza Pokorny
ae35a29169 Allow objects to be streamed to stdout
Change-Id: Icd8de6b2122fe77926d93da9bda08f56c3672a7a
2017-07-05 20:08:18 -03:00
Rodolfo Alonso Hernandez
c17819ab58 Add new parameter "is_default" to Network QoS policy.
Add a set of exclusive parameters to the Network QoS policy:
  --default: makes this policy the default policy for
             the project to which the qos policy belongs.
  --no-default: unset the property.

Closes-Bug: #1639220
Depends-On: If5ff2b00fa828f93aa089e275ddbd1ff542b79d4
Depends-On: Ibe7b7881cb190bfd5582f35b6de51a8bc21135de
Change-Id: I0269b837dc29bbd8ee2089d847cadb72d800fa30
2017-07-05 13:34:33 +00:00
blue55
20c23d8ccb Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H203] Use assertIs(Not)None to check for None

Change-Id: I59dafb62cedc5217b6e5eb6efb997a9ee3c29bbb
2017-06-23 16:31:48 +08:00
Rodolfo Alonso Hernandez
ccb743cf0f Add direction field to QoS bandwidth limit.
This patch enables the direction ('ingress'/'egress') field
on the QoS bandwidth limit rule object and CRUD commands.

Closes-Bug: #1614121
Depends-On: Ia13568879c2b6f80fb190ccafe7e19ca05b0c6a8
Depends-On: I90c412a5c8757b3ffe8abfc1165a70bdb8744702
Change-Id: Ic6981474f22efbf294ac11c2e0304b04494a1bbe
2017-06-22 15:59:37 +00:00
Reedip
eb793dc8c6 Add default-quota to subnet pool commands
Add --default-quota option to subnet pool create and set commands.

Setting default-quota back to None may break the current Neutron
behavior, therefore support for Unset command is not provided in
this patch.

Neutron API:
a0e0e8b668/neutron/api/v2/attributes.py (L239)

Closes-Bug: #1667294
Change-Id: Ia4e7c23a49e91a090133c729353cdb8e62bc5674
2017-06-12 02:52:28 +00:00
Akihiro Motoki
eeb614c477 volume functest: ensure snapshots deleted when volume delete
Deleting snapshot may take time. The current volume API does not allow
to delete volumes with snapshots, so if deleting snapshot may take time,
a delete request for a parent volume will fail.
This sometimes causes functional test failures in slow environments.

wait_for_status() checks whether volume status is in error statuses
but previously the expected error status was wrong. Cinder API uses
lower case as volume status, so it did not work expectedly.

Change-Id: I095894ba39f23bf81d71351818d24dbb5ca459fb
2017-06-06 01:14:20 +00:00
Jenkins
c5524c80be Merge "Replace "Display Name" by "Name" in volume list" 2017-06-05 20:10:56 +00:00
Vu Cong Tuan
b52bbe1eec Trivial fix typos
Change-Id: I72a1da209df38e226ec02d9dbd0142ed4020c0d2
2017-05-30 16:38:27 +07:00
Rui Chen
6aceca218a Replace "Display Name" by "Name" in volume list
Current "volume list --name" command use "display_name" as search_opts
to send to cinder API, and show the result table with "Display Name"
column title in osc, cinder list API support "name" as search opts too,
and there is "name" attribute in volume response body, so we can replace
all "Display Name" by "Name" in order to keep "volume list" command
consistent with other commands, like: server list, network list and so
on, only use "Name" attribute for all objects.

Support a mapping for volume list -c "Display Name" (Volume v1 and v2)
and volume create/show -c "display_name" (Volume v1) for minimal
backward compatibility until R release.

Change-Id: I120be0118e7bb30093b4237c5eeb69a9eedef077
Closes-Bug: #1657956
Depends-On: I1fb62219b092346ea380099811cbd082cae5bafe
2017-05-26 11:37:09 +08:00
Jenkins
b78153aec4 Merge "Add functional test for volume service" 2017-05-25 19:53:51 +00:00
Jenkins
5f41f651e5 Merge "Convert volume functional tests into JSON format" 2017-05-25 19:30:17 +00:00
Jenkins
fdb70bb49b Merge "JSON-ify image functional tests" 2017-05-24 19:17:53 +00:00
Dean Troyer
6425fc3059 JSON-ify image functional tests
Change-Id: Ica91eddfdebe68449544feb5e29113db075bf11c
2017-05-24 11:14:28 -05:00
Jenkins
205d6e408a Merge "Refactor Extension show and list command" 2017-05-22 23:35:59 +00:00
Jenkins
3fabbe9b39 Merge "Create server with security group ID and name" 2017-05-22 23:09:02 +00:00
Jenkins
7c43c1a3c3 Merge "Convert image functional tests into JSON format" 2017-05-22 20:49:10 +00:00
Rui Chen
45496feee6 Create server with security group ID and name
Both resource ID and name are supported to identify an object
in openstackclient to make user easy to input, for security group,
nova only support security group name in API when launch a new server,
this patch convert ID to name, then pass name to nova API, and check
the security group exist before creating server.

Change-Id: I1ed4a967fb9de3f91c8945a1ef63f6c7b6b2dfb2
Closes-Bug: #1687814
2017-05-22 20:32:01 +00:00
Ankur Gupta
acc2d106ab Refactor Extension show and list command
1.keep the column display order consist in extension list with
  and without "--long" option.
2.rework for network extentsion list, openstacksdk return object,
  so the logic should be same with other service.
3.add some unit test cases, like: extension list --network --long,
  extension list --network --compute, to cover regular use cases.
4.raise exact exception when network extension don't exist, avoid
  internal TypeError in "extension show" commands.

Change-Id: I2e23ced80d8da8aa1106b22472db850367b351ce
Closes-Bug: #1689233
2017-05-18 11:33:45 +08:00
Akihiro Motoki
332671f92a Convert image functional tests into JSON format
Change-Id: Ic8eb72e8f89e5e40cf2b7594a196bb31d38e6b04
2017-05-17 03:53:08 +00:00
Akihiro Motoki
62c793c7e4 Convert volume functional tests into JSON format
volume_type and transfer_request func tests have not been
converted into JSON func tests. This commit converts them
into JSON format.

Change-Id: I56820c4e15bda95e911e57657c1ff5437daf83ae
2017-05-17 01:50:21 +00:00
Rui Chen
7a7bb06377 Make block-device-mapping more stable and clear
The patch fix the following issues:

1. ValueError is raised if input don't contain "=". Sometimes the whole
"server create" command is very complex, it's difficult to find out root
reason directly.
2. Don't support to add block device from snapshot, like:
--block-device-mapping
vdb=0c8ae9d8-cadc-4a23-8337-4254614d277e:snapshot:1, it's supported by
novaclient, but not in osc.
3. If input "vdb=", not add any mapping information, the server will be
launched successfully, not raise error message to let use add
volume/snapshot id, just ignore "--block-device-mapping" option.
4. The help message of "block-device-mapping" option is so simple, need
to add some details about how to add <type>, <delete_on_terminate>
contains.

Change-Id: Ib7f7a654c3dc2a8272545f168b4c4ced230ce39e
Depends-On: Ib37913891bbf7a31b570404c4668c490d5ac859b
Closes-Bug: #1667266
2017-05-17 01:42:12 +00:00
Dean Troyer
6f31634f17 Rework floating ip functional tests
Regualr expresstions were an interesting diversion, get rid of them
from the functional tests.  It did lead to better structure...

Change-Id: I1ff32ad7715ebd88401925ce3f6c412a66e82566
2017-05-10 09:48:38 -05:00
Dean Troyer
07a4363e99 Skip floating ip attach functional test on nova-net
As of Ocata release Nova forces nova-network to run in a cells v1
configuration.  Floating IP and network functions currently do not
work in the gate jobs so we have to skip this.  It is known to work
tested against a Mitaka nova-net DevStack without cells.

Change-Id: I74f67ac8eb12c7a649ddcbd7979cf745fb35cc0c
2017-05-03 14:41:35 -05:00
Dean Troyer
346ac9da62 Nova-net functional tests: aggregates
Nova-net requires a cells v1 configuration to run as of Ocata, but
aggregates and cells v1 are not golfing buddies, so don't let them
meet on the back nine.

Skip the aggregate add/remove host commands in the cells v1 config,
leave the others because they should work, just not be very useful.

And format things consistently.

Change-Id: I131d9f883cb7aca53ad82fb7d5fc6ee1c1e7d923
2017-05-02 14:09:16 -05:00
Dean Troyer
983cccb662 Functional tests: Identity v2 and DevStack
DevStack master (as of 01May2017) no longer sets up an Identity v2
admin endpoint, so we need to skip those tests going forward and cover
them via a specific leagacy job.  This does the detect-and-skip.

Change-Id: Ib9ab32b6bc84ec7d13508094ad6f83995d8d7bc1
2017-05-02 10:32:21 -05:00
Jenkins
a2b69886a4 Merge "Nova net functional tests round 3" 2017-04-29 03:44:49 +00:00
Jenkins
524b2b36ff Merge "Fix volume qos spec list" 2017-04-29 03:25:55 +00:00
Dean Troyer
2c5405ed5e Fix volume qos spec list
This has been sporadically failing in functional tests due to the way
the volume qos spec list command calls get_associations() for each spec.
When tests run in parallel occasionally a spec from another test is present
in the list returned and is deleted before the get_associations() call is
made, causing a NotFound exception.  We should just keep going when this
occurs.

* make v1 match v2
* add tests to ensure the exception is being caught and handled

Closes-Bug: #1687083
Change-Id: If2d17c1deb53d293fc2c7f0c527a4e4ef6f69976
2017-04-28 16:06:00 -05:00
Dean Troyer
190711ecd7 Nova net functional tests round 3
* network segment
* network service
* port
* router
* security group
* security group rule
* subnet
* subnet pool
* extension
  The extension tests were duplicated to have both compute and network
  extensions tests so the nova-net case will still exercise the extension
  commands.

Also clean up formatting from previous reviews to make the Network functional
tests look and act consistently.

Change-Id: I286c40572faa31ddcef595cec740da933b2defc1
2017-04-28 14:40:45 -05:00
Jenkins
efcf3b22ad Merge "Fix Nova-net netowrk commands" 2017-04-28 19:18:03 +00:00
Dean Troyer
dd7da49325 Nova net functional tests round 2
* floating ip
* ip availability
* network qos policy
* network qos rule
* network qos rule type
* network rbac

Change-Id: Id3946bdff43bfef3a1d879c058bde4792bd299c6
2017-04-28 09:46:51 -05:00
Dean Troyer
e0d1af94a1 Nova net functional tests round 1
* address scope
* network agent
* network flavor
* network flavor profile
* network meter
* network meter rule

Also create a new common network functional test class
NetworkTests to house the setting of haz_network in a single place.
The individual test skipping stays in the final classes to re-enforce
the idea that some tests work with both Nova-net and Neutron.

Change-Id: Ie3910231c6fc9e2031438c599afa904f43c874a7
2017-04-28 06:39:21 -05:00
Dean Troyer
589a65c3fe Fix Nova-net netowrk commands
In cleaning up functional tests for nova-net, I discovered some
problems in network create:
* --subnet option is required in network create command
* Switch API to use /os-networks rather than /os-tenant-networks as this
  is what we were actually using via novaclient
* Fix functional tests for nova-net
* Normalize some private function names in network/v2/network.py

Change-Id: I426b864406756d58d140575a3a45ee9aee67ce84
2017-04-27 20:36:00 +00:00
Jenkins
7b609ebd55 Merge "Fix server create with nova-net" 2017-04-27 03:06:50 +00:00
Jenkins
19a7081aa0 Merge "Fix quota functional tests for nova-net" 2017-04-27 03:03:08 +00:00
Dean Troyer
871450abcd Fix quota functional tests for nova-net
We need to skip some functional tests when testing against a nova-net cloud
so add the bits to detect that.

Also JSON-ify the quota functional tests and add the skips for nova-net.

Change-Id: Ibfeeb3f967f34c98e80271a8214cf95dc50407f1
2017-04-26 23:52:34 +00:00
Dean Troyer
bffc98e4e5 Fix server create with nova-net
A Neutron-ism slipped by in server create.

Change-Id: Id590d7f93df2a41d7bd7617459a2af159a6f8071
2017-04-26 18:49:50 -05:00
jiahui.qiang
d519911c43 Functional test for subnet_pool
Refactor functional tests for testing more command options.

Change-Id: I0c9c3b04dd2b79766a8fe82cbc5315c030f4784d
2017-04-26 12:51:58 -05:00
Huanxuan Ao
db6081fb80 Fix network list functional test
An error in network func test broke our CI,
looks like the "is_default" should be "False"
by default for now.

Change-Id: I021eb8abd9bdf55c7c06031152c107312f104b34
2017-04-19 21:47:57 +08:00
Dean Troyer
4289ddd47a Low-level Compute v2 API: security group
api.compute.APIv2 starts with security group functions.

novaclient 8.0 is now released without support for the previously
deprecated nova-net functions, so include a new low-level REST
implementation of the removed APIs.

Change-Id: Id007535f0598226a8202716232313e37fe6247f9
2017-04-11 02:08:04 -05:00
Sindhu Devale
763c8c5670 "floating ip set/unset port" for OSC
Implements Neutron feature of floating ip associate/disassociate
into OpenStack Client.

Previously, network.find_ip() function only supported to
search floating ip by UUID. Hence, _find_floating_ip()
function is used in floating_ip.py, to search fip both by UUID
and ip_address. [1] adds the ability to find fip object using both UUID
and ip_address. This functionality however, won't be available until
the SDK is released. Hence, we continue to use _find_floating_ip()
method, which was cleaned up by [2] to remove the use of ip_cache.
Once, the SDK is released, we will remove all the usage of
_find_floating_ip() method and instead only use network.find_ip().

[1] https://review.openstack.org/#/c/449879/2
[2] https://review.openstack.org/#/c/447938/

Change-Id: I6c5222287c46ca42365917d2deae70bdb626347
Co-Authored-By: Reedip<reedip.banerjee@nectechnologies.in>
Co-Authored-By: RuiChen<chenrui.momo@gmail.com>
Closes-Bug: #1560297
2017-04-05 16:12:40 +00:00
Jenkins
8a1f4b6592 Merge "Introduce neutron flavor associate, disassociate to OSC" 2017-04-04 02:38:59 +00:00
Shashank Kumar Shankar
b51310a4bb Introduce neutron flavor associate, disassociate to OSC
This patch introduces network flavor associate and disassociate to
OSC. The following neutron equivalent commands are implemented in OSC:

    - neutron flavor-associate
    - neutron flavor-disassociate

Change-Id: Icba4dbf7300a36353142586359059cd6784049dc
2017-04-03 17:02:03 +00:00
Rui Chen
341f07582e Add help commands withouth auth in functional
A special scenairo is that users want to check the commands
help message, but don't set authentication info at all. Add
a related functional test case to cover it.

Change-Id: I7b09701df24d6f6dfcf369f89212f72e753be6e4
2017-04-03 16:27:25 +00:00
Jenkins
ca06a09d4d Merge "Fix volume transfers request commands" 2017-03-28 17:33:25 +00:00
Jenkins
dd81ca0692 Merge "Simplify logic around option lists in port set" 2017-03-27 17:33:23 +00:00