5258 Commits

Author SHA1 Message Date
Toure Dunnon
a1fc820a2f
python-shade expose MTU setting.
The networking API v2 specification, which is implemented by
openstack neutron, features an optional MTU parameter - when
creating a network, this allows operators to specify the value
for the maximum transmission unit value.

Change-Id: I288f02551555fff3e8b350fc6d7c6ae8f60c405c
2018-07-30 14:43:07 -05:00
Rarm Nagalingam
8eb788af07
Adds toggle port security on network create
Added a new property, 'port_security_enabled' which is a boolean to
enable or disable port_secuirty during network creation. The default
behavior will enable port security, security group and anti spoofing
will act as before. When the attribute is set to False, security
group and anti spoofing are disabled on the ports created on this
network.

Change-Id: If984a82ca5f6fb69ee644f4fa84333df09d7f8bc
2018-07-30 14:39:42 -05:00
Zuul
52cf40bbe5 Merge "Support for microversions in base Resource" 2018-07-27 23:15:51 +00:00
Monty Taylor
94b2bf06de
Update create_object to handled chunked data
We try to calculate len for data, which breaks with chunked uploads, but
we only use that with filename. Move the code so that we don't try to
calculate length of things where we don't need to.

We still need to figure out streaming uploads and large objects.

This changes several unit tests due to the re-ordering of when
get_object_segment_size gets called. It's not necessary to call it for
the data path, so it was moved to later, which puts it after the
container create. For data paths this results in one less call. For file
paths, the calls are the same but the /info call happens later.

Change-Id: I841d7049ff2f05e00a31fecbc27dda6a0007be16
2018-07-27 11:57:38 -04:00
Dmitry Tantsur
a3c1690231 Support for microversions in base Resource
This change allows a Resource to negotiate the highest microversion
supported by both the client (openstacksdk) and the server. It is
done by overriding Class._max_microversion to a non-None value.

The microversion used to load or update a Resource is stored on it
as the "microversion" attribute.

Change-Id: I78703bece7c1a3898e4a5b60cd7c2912cf4b5595
2018-07-27 09:54:07 +02:00
9281c5b755 Update reno for stable/rocky
Change-Id: Id86c6eecea0a39a994dbed9672610fd3f5f34fd3
2018-07-26 12:35:04 +00:00
Zuul
913f1a484b Merge "Run ansible tests against specific public cloud" 2018-07-24 17:38:51 +00:00
Zuul
655998e5a7 Merge "Docs: Remove duplicate content in connection page" 2018-07-21 13:23:53 +00:00
Zuul
3e8b6222a3 Merge "Docs: Include CloudRegion class" 2018-07-21 13:23:52 +00:00
James E. Blair
d9f648dd54 Docs: Remove duplicate content in connection page
This paragraph at the bottom of the connection page duplicates
the content just above it.

Change-Id: Icb718a469940d17dff7d0401ceb3f03e88d5af30
2018-07-20 19:29:26 -07:00
James E. Blair
66ebf04bac Docs: Include CloudRegion class
This class was referenced (several times) from the configuration
documentation, but not included in the docs.

Change-Id: Ib8a075713694fb0e52c730624fbe01d8964c6903
2018-07-20 19:29:05 -07:00
Dmitry Tantsur
031acd9991 baremetal: correct the default timeout in Node.set_provision_state
It should be None, which allows the client to wait until the server
side timeout. True is probably cast to 1, which is incorrect.

Change-Id: I6ae42b44b5460fed5291584576bb9eb7bcdfecb4
2018-07-20 13:44:19 +02:00
Zuul
4600f1ec7b Merge "Add create_directory_marker_object method" 0.17.0 2018-07-20 06:33:57 +00:00
Zuul
dbfab587db Merge "Add ability to pass data to create_object" 2018-07-20 06:33:56 +00:00
Zuul
cf50f1152a Merge "Add flag for disabling object checksum generation" 2018-07-20 06:33:55 +00:00
Zuul
4afdb2f9e5 Merge "Use valid filters to list floating IPs in neutron" 2018-07-20 02:17:31 +00:00
Monty Taylor
d7d6072f15
Add create_directory_marker_object method
Add a helper method for creating zero-byte directory objects for web
traversal.

Change-Id: If21964f2c1cf7f30cb058921f0a63fb1824c2af2
2018-07-19 18:03:08 -05:00
Monty Taylor
6ef2b1fffb
Add ability to pass data to create_object
create_object currently only accepts data in files. That's not awesome
for some usecases, such as creating 0-byte 'directory' nodes. Add a data
parameter so that data can be passed in.

Change-Id: I35e08d7b1a4fd6ded822edeba9e62a1390a6c4e8
2018-07-19 15:44:53 -05:00
Monty Taylor
5f46fe8842
Add flag for disabling object checksum generation
Checksums are calculated and added to the object's metadata as a way
to prevent double-uploading identical copies of large data. For some
use cases, such as uploading log files, there is no risk of that and
there is no point to paying the calculation cost.

Change-Id: I7b3c94b72e99f9abd3c961bd811da6fd563144bb
2018-07-19 15:43:22 -05:00
Hongbin Lu
645d148ddb Use valid filters to list floating IPs in neutron
OpenStackSDK used 'attached' as a filter for listing floating IPs,
but this is not a supported parameter in neutron. In before, the test
passed because neutron server ignored this parameter and returned
all the floating IPs. However, neutron is planing to employ a strict
validation on the list endpoint [1]. As a result, neutron will reject
the request with 400 response if the request contains unknown filter.

This patch fixes the usage of neutron API. It passes filters to neutron
API only if they are known supported filters. The list of supported
filters for listing floating IPs can be found in the neutron API
reference [2].

[1] https://review.openstack.org/#/c/574907/
[2] https://developer.openstack.org/api-ref/network/v2/#id130

Depends-On: I124adfc5e9cdd5bc20aacf23f9dcc10c55b0870b
Change-Id: I47eac210bd0364166647345ff14ea0c49ef4e9e3
2018-07-19 19:35:49 +00:00
Zuul
bf8c9a2996 Merge "Add missing release note about vexxhost auth_url" 2018-07-19 17:09:59 +00:00
Zuul
7309376c0a Merge "meta: don't throw KeyError on misconfigured floating IPs" 2018-07-19 17:09:57 +00:00
Zuul
f523dc8da8 Merge "Add set_provision_state and wait_for_provision_state for baremetal Node" 2018-07-19 15:14:41 +00:00
Zuul
3984044c8d Merge "Implement signature generation functionality" 2018-07-19 15:06:01 +00:00
Monty Taylor
58ed1278d8
Add missing release note about vexxhost auth_url
The auth_url change deserves a release note, and the why of it is
actually interesting information for people.

Change-Id: I0ec28a4f25593ce1ebcb7254780b41685944bd3b
2018-07-19 08:50:56 -05:00
Monty Taylor
ad9f8a0395
Add missing swift docstrings
These methods don't show up in the docs without doc strings.

Change-Id: I5640eeacd32b1444301c3f900844386300428572
2018-07-18 17:49:16 -05:00
Monty Taylor
2ad74a54aa
Add /v3 to the auth_url for vexxhost
v3password skips discovery, so v3password with unversioned endpoint
produces incorrect results. We could go to password, but then people
won't get clear errors if they leave out domain info.

Change-Id: Ia070ebafb608aec6a85a38feb746113f72c58eec
2018-07-18 15:51:45 -05:00
Josephine Seifert
f2aeaead02 Implement signature generation functionality
Openstacksdk is extended with a signature generation functionality.
This adds cryptography to the requirements and lower constraints.

Change-Id: Idc15b9a12d408bd4b2e096da8402c374be56f9fa
Story: 2002128
Co-Authored-By: Markus Hentsch <markus.hentsch@secustack.com>
2018-07-18 13:18:40 +00:00
Dmitry Tantsur
5e4420763a Add set_provision_state and wait_for_provision_state for baremetal Node
This change adds set_provision_state and wait_for_provision_state
to openstack.baremetal.v1.Node, as well as set_node_provision_state
to the bare metal Proxy. Also adds wait_for_nodes_provision_state,
which is similar to Node.wait_for_provision_state but handles several
nodes at the same time, which is important for bulk operations.

The cloud's node_set_provision_state was updated to use the new calls.
As a nice side effect, it now supports all provision states and actions
up to the Queens release, as well as does proper microversioning.

Some documentation was written for the bare metal proxy.

Change-Id: I22a76c3623f4dd2cca0b2103cbd8b853d5cebb71
2018-07-17 13:58:43 +02:00
Rui Chen
722d8136b2 Run ansible tests against specific public cloud
We want to run ansible tests against some public cloud, but
there are always some API policy limits for regular users in
public cloud, like: can not create external network. So we define
some variables that can be changed for different limit scenairoes.

1. Create port in external or internal network.
2. Specified public pool name when launching server.
3. Create simple router, then add interface and external gateway,
   change test step order, so that do not create external network
   when network_external=false.
4. Create subnet with enable_dhcp true or false.
5. Make ANSIBLE_VAR_* environment variables can be passed into virtual
   env.

Change-Id: I69473756b23a6cb525e0f9bb40d09e6ed9880782
2018-07-17 14:26:56 +08:00
Benoît Knecht
6b694a8225 meta: don't throw KeyError on misconfigured floating IPs
When a floating IP is associated to the network port of a server with a
fixed IP that doesn't belong to the server,
`_get_supplemental_addresses()` throws a `KeyError`.

While it's most likely a misconfiguration of the floating IP, we should
handle that situation gracefully.

Change-Id: I8093ce58dd22b901521803e878536ab4fa03141f
Task: 22974
2018-07-13 09:24:30 +02:00
Zuul
2fa2720eeb Merge "Add vip_qos_policy_id options for loadbalancer" 2018-07-12 21:17:42 +00:00
Zuul
2b7199f451 Merge "openstackcloud: properly handle scheduler_hints" 2018-07-12 17:07:10 +00:00
Zuul
a1d5e60af7 Merge "Handle Munch objects in proxies" 2018-07-12 15:02:28 +00:00
Benoît Knecht
a0e5fa33a8 openstackcloud: properly handle scheduler_hints
Scheduler hints need to be specified at the top level of the JSON being
submitted to the API, i.e.

```
{
  "server": {...},
  "os:scheduler_hints": {...}
}
```

instead of

```
{
  "server": {
    "os:scheduler_hints": {...}
  }
}
```

Change-Id: I19b5736b87e4b323bb957bd247b45e87bf3e8227
Task: 22955
2018-07-12 09:18:03 +02:00
Zuul
9a1daae147 Merge "Add task manager parameter to Connection" 2018-07-12 02:29:27 +00:00
Zuul
fdde1c16b6 Merge "Support to wait for load balancer to be ACTIVE" 2018-07-11 16:08:52 +00:00
Monty Taylor
97aa69617f
Add task manager parameter to Connection
TaskManager can be overridden but Connection doesn't currently expose
this in the constructor.

Change-Id: Iaa17fb40fd2e56eb60d3c3ed227ad82089ce8506
2018-07-11 09:57:31 -05:00
Zuul
39edca1899 Merge "Add Magnum /certificates support" 2018-07-11 14:29:11 +00:00
Zuul
6e5eb47ba8 Merge "Fix Magnum cluster update" 2018-07-11 14:17:31 +00:00
Feilong Wang
2f8d059075 Add Magnum /certificates support
Change-Id: Ifdc3bd435b9e65160212a76899858b27ff95e7c8
2018-07-11 19:00:50 +12:00
Dao Cong Tien
c1bc7c5879 Invalid link of doc reference
Change-Id: Ibd47a7a9324468bee38f7a5e001360a53b3fec0b
2018-07-11 13:24:54 +07:00
Lingxian Kong
abfc8580f4 Support to wait for load balancer to be ACTIVE
This patch is adding a utility method `wait_for_load_balancer` that can
be used either in user's application or the ansible module.

Story: 2002924
Task: 22907
Change-Id: I68daeb44d9206892078e8d199b076b2f93234241
2018-07-11 15:18:56 +12:00
Feilong Wang
38fafc7680 Fix Magnum cluster update
The only attribute can be updated is 'node_count' not 'name'[1]. This
patch fixes it.

[1] https://github.com/openstack/magnum/blob/master/magnum/api/validation.py#L32

Change-Id: Idb7578f63e688d9fdc85a8514d00ad03b99d8f83
2018-07-10 14:17:03 +12:00
Monty Taylor
cf47f3f7c0
Add support for processing insecure
python-openstackclient uses this on the command line - and has to go
through a bunch of shenanigans to get it processed correct. Just do it
ourselves from the get-go so that we can just remove the stress from
osc.

Change-Id: I25ce459eb38ec246260e1792035f26d46729c920
0.15.0
2018-07-08 15:04:01 -04:00
Zuul
66f3d14437 Merge "Fix for passing dict for get_* methods" 2018-07-05 22:51:48 +00:00
Zuul
209c915dcc Merge "Implementing solution for 2002563 issue from story board" 2018-07-05 20:50:46 +00:00
David Shrewsbury
0eedfb106c
Fix for passing dict for get_* methods
We are not accepting dicts for the name_or_id parameter, only objects.

Change-Id: I31f0f127f71f10a2f11f89e10ac8911816786963
2018-07-05 14:36:01 -05:00
Zuul
c3ce78ed2c Merge "Only send force parameter to live migration if supported" 2018-07-05 19:11:54 +00:00
Zuul
6479a638f2 Merge "Add connection backreference to proxy instances" 2018-07-05 18:54:59 +00:00