788 Commits

Author SHA1 Message Date
Jenkins
6c8802cdea Merge "Add hacking check to ensure not use xrange()" 2016-03-12 00:33:28 +00:00
Jenkins
31ab88e1ee Merge "Single-Create Documentation" 2016-03-11 19:49:23 +00:00
Trevor Vardeman
8e2c766a53 Updating unit testing
Single create was accepted on the condition that some unit test coverage was
added afterward.  In testing I found a few errors involving the "pop" method,
and included those fixes here.

Closes-Bug: #1551427
Change-Id: If6dc8521ecf3bd194638f163e128fa2015320da8
2016-03-11 10:08:34 -06:00
Tin Lam
8d0b16292d Add hacking check to ensure not use xrange()
Added hacking check to ensure not to use xrange.  Also,
fixed issues with EoF missing newline [W391].

Change-Id: Iba8d240c042e46cb34eb6ed057534d62efb6f903
Closes-Bug: #1538118
2016-03-11 07:49:25 -06:00
Trevor Vardeman
f828a9b3e5 Single-Create Documentation
Since single-create utilizes the existing objects already documented, I added an
example for the request and response, and indicated to look for more details
in the appropriate object's section.

Change-Id: Icdf7f21867457e22086f9c44ab657f95617bee1a
Closes-Bug: #1551428
2016-03-10 17:37:13 -06:00
Jenkins
a011b405a7 Merge "Use rfc3986 module for URL validations" 2016-03-10 20:28:58 +00:00
Jenkins
de0cbfa1a4 Merge "Change render_unsets default to False" 2016-03-10 17:42:00 +00:00
Brandon Logan
89335a3851 Change render_unsets default to False
The API WSME Types all inherit a to_dict method that accepts as a parameter
render_unsets. It is currently set to True by default but should be False for
consistency and also because it just makes better sense. This has caused some
unnecessary workarounds and work before it was known this existed.

Closes-Bug: 1555493
Change-Id: Idd21a003c0b1e3092f979013f8c19d75f17d0249
2016-03-10 02:48:37 -06:00
Stephen Balukoff
26d850c711 Use consistent type checking of project_id in API
We were using inconsistent type checking for the project_id in various
API endpoints. This could lead to erratic behavior if some API requests
specified the project_id UUID with hyphens and some without hyphens and
normlization occurred.

This patch changes this behavior to use consistent type checking for the
project_id for all API endpoints. Since this bug is a regression that is
less than 2 weeks old, I've also introduced a few unit tests which
should ensure we don't have another regression of the desired behavior
anytime soon.

Change-Id: I4c3ec52c01547196160e977029ecc5ded97c79ed
Closes-Bug: #1555401
2016-03-09 18:20:44 -08:00
Stephen Balukoff
37c99a575b Use rfc3986 module for URL validations
Change-Id: I9466490b17e38a6653f85a6d1ceba7d10aa59a62
Closes-Bug: #1548919
2016-03-09 16:11:42 -08:00
Jenkins
972cdba6ee Merge "Make SSH bind to management net only" 2016-03-09 22:26:12 +00:00
Jenkins
eb7a36565c Merge "Replace deprecated LOG.warn with LOG.warning" 2016-03-09 21:52:01 +00:00
Jenkins
5f8eb23857 Merge "Add unit tests for L7Policy API" 2016-03-09 21:19:30 +00:00
Jenkins
357e3375a5 Merge "Add missing unit tests for L7Rule API" 2016-03-09 21:19:24 +00:00
Jenkins
ed152a5b0d Merge "Add maximum number of l7rules per l7policy" 2016-03-09 21:19:17 +00:00
Jenkins
6a97904590 Merge "Adds release notes for Active/Standby" 2016-03-09 21:19:12 +00:00
Jenkins
c4acd4fd30 Merge "Add CA Cert file config option to validate against SSL endpoints" 2016-03-09 21:14:16 +00:00
Bharath M
f4da51c27d Add CA Cert file config option to validate against SSL endpoints
Currently Octavia cannot validate against SSL service endpoints,
which would be keystone, neutron, nova and glance in this case.

This patch adds a config option under nova, neutron and glance
sections to read the specified CA certificate files
for validation. It's slightly different in the case of glance,
because glance session method invocations depend on the endpoint
URL whether it starts with HTTP or HTTPS.

Also added is the "insecure" option for these services in case
the cert validation needs to be skipped.

For keystone, we read config params from keystone middleware. Thus,
instead of defining a new config option, we can make use of it's
pre-defined "cafile".

Barbican is not added because we do not yet have a barbican endpoint
override in it's config. This could be added in the future as a
separate patch, if needed.

Lastly, unrelated to the above, fixes the amphora REST api default
bind_port in octavia.conf

Change-Id: Id57672a3dc7c962b8ee07db0cb7a743041082c66
Closes-Bug: #1552987
2016-03-09 10:15:44 -08:00
Michael Johnson
a9fde42f6d Remove an unused configuration option
This patch removes an unused configuration option
"haproxy_cert_dir" that was flagged as a potential security
risk.

Change-Id: I31af43e8265431767544802451d9b5c297d83d28
Closes-Bug: #1548556
2016-03-09 01:28:15 +00:00
Jenkins
178f13b930 Merge "Update doc to make it consistent with the actual api" 2016-03-08 20:20:34 +00:00
zhang.lei
de41db2755 Replace deprecated LOG.warn with LOG.warning
Python 3 deprecated the logger.warn method, see:
https://docs.python.org/3/library/logging.html#logging.warning
so we prefer to use warning to avoid DeprecationWarning.

Change-Id: I49544d1370e7fe083eb23752227567d8d6f24020
Closes-Bug: #1508442
2016-03-08 14:54:24 +08:00
Stephen Balukoff
f6b527b32a Add unit tests for L7Policy API
Note: The only lines not tested in this have to do with the _lookup
method for manipulating L7 rules. Hence the reason the unit test here
ended up in the l7rule.py test file.

Closes-Bug: #1549003
Change-Id: I0c7325a7a974be51d4c57c3d430cad959a09250e
2016-03-07 15:00:53 -08:00
Stephen Balukoff
cb4df2f84e Add missing unit tests for L7Rule API
Change-Id: I6e86114d6b8bffcdb5ebe705a89ad5f88a4b38ff
Closes-Bug: #1548922
2016-03-07 13:39:38 -08:00
Stephen Balukoff
df5f907185 Fix default_pool_id type in l7policy API
The L7Policy API type checker presently lists the redirect_pool_id
parameter as StringType(). While this is not incorrect, it is more
correct to call it a UuitType().

In addition to the above change, I removed unnecessary string length
checking on string response parameters.

No tests needed updating, as we already have good test coverage of the
validations we do on the redirect_pool_id in the L7Policy API.

Change-Id: I2bf70b51c6bc0949165f8af31c7d47c3407df08b
Closes-Bug: 1549013
2016-03-07 01:25:36 -08:00
Stephen Balukoff
ad3423afca Add maximum number of l7rules per l7policy
For reasons of pure practicality, it is not a good idea to allow tenants
to create arbitrarily long lists of l7rules on their l7policies. After a
brief discussion we decided that 50 rules is good limit, especially
given that we expect most practical uses of L7 functionality to entail 1
to 4 rules per policy at most.

This commit also fixes a minor bug I noticed in the L7 rule API tests,
and cleans up the L7Rule API rule response specification.

Change-Id: I28b8161e85b9e86d4c44be3d48cbf94a3ce631f3
Closes-Bug: 1549100
2016-03-07 01:15:06 -08:00
Michael Johnson
c3bd87a8ee Adds release notes for Active/Standby
This patch adds release notes for a feature added early in Mitaka.

Change-Id: If85d90ff30175011365da77776276a837a9fb252
Implements: blueprint activepassiveamphora
2016-03-07 02:31:18 +00:00
Jenkins
74d706113c Merge "Add pre_test_hook to run gate jobs" 2016-03-06 21:03:28 +00:00
Jenkins
edab092d7e Merge "Updated from global requirements" 2016-03-06 03:47:33 +00:00
Jenkins
2b373f6dfc Merge "Remove swift related content in the sample local.conf" 2016-03-06 03:32:18 +00:00
OpenStack Proposal Bot
8cc63650fc Updated from global requirements
Change-Id: I342089b5e8a09e7e10fec6e935ecc1f515063d9d
2016-03-05 20:48:46 +00:00
Jenkins
343657a093 Merge "Better L7Policy API validations" 2016-03-05 20:23:14 +00:00
Jenkins
a46599118a Merge "Use "--pub-key" instead of "--pub_key"" 2016-03-05 19:39:51 +00:00
Jenkins
3c13912134 Merge "Adds the Cascade Deelete REST API doc" 2016-03-05 19:39:45 +00:00
Jenkins
5430c46c4c Merge "Add release notes for L7 and shared pools" 2016-03-05 19:39:39 +00:00
Jenkins
87ca28d5bc Merge "Fixed make sure to get IPv4 value by awk in sample local.sh file" 2016-03-05 19:12:08 +00:00
Jenkins
8f7a00a925 Merge "Block deletion of pool in use by L7Policies" 2016-03-04 23:36:34 +00:00
Jiahao Liang
8161b885f3 Update doc to make it consistent with the actual api
Closes-Bug: #1552965

Change-Id: I160fb31d40849230010caedd4f79e5cc7c86661a
2016-03-04 14:13:14 -08:00
madhusudhan-kandadai
d013927a7b Add pre_test_hook to run gate jobs
Tweak set of services with plugins to run gate jobs
for Octavia scenario tests.

Change-Id: Ibaecb2e0141e3ff9a19acf4c2b63aeae60e6ed9a
2016-03-04 22:12:34 +00:00
Stephen Balukoff
81c73bd1b5 Make SSH bind to management net only
Our present amphora image create scripts set up the ssh daemon on the
amphora to bind to the wildcard interface (which is the default).
However, this causes problems for anyone who tries to set up a listener
on TCP port 22, since haproxy will not be able to bind to the same IP.

This patch introduces a dhclient post-bind script to the amphora image
to gracefully rebind the SSH-daemon to only the load balancer management
net IP when it comes up on the network, solving the above use case. This
patch has the secondary benefit of making the amphora's SSH daemon only
respond to requests on the management network, which incrementally
increases the security of the amphora.

Change-Id: Iab93cec1f4dc4a2e37ad3cb8a92c132383dcda6a
Closes-Bug: #1551505
2016-03-04 13:58:33 -08:00
Stephen Balukoff
0fac4f2cd9 Better L7Policy API validations
Testing of the API shows that it didn't react well to having
non-essential parameters set to 'None' in update requests. This
patch moves L7Policy validations much sooner in the update process
(ie. we catch them at the API), and otherwise reorganizes most of
the L7Policy validation code into the common validations file both so
that it can be called from various locations in the code base, and
so that we can have an easier time unit testing the validation code.

Closes-Bug: 1550913
Change-Id: I7c14a8cef3d74b2b8d6f4d1ec4f6f9f32f96b9ad
2016-03-04 13:49:14 -08:00
Jenkins
5c8ebf0784 Merge "Add bandit baseline to tox" 2016-03-04 18:31:02 +00:00
chen-li
5844f9494b Remove swift related content in the sample local.conf
Swift is not default enabled by devsatck, and it is not used
by Octavia by default too. The content in the sample local.conf
is useless.

Change-Id: Ie3accb5c1be455f0212fbc07d4f5c26a55529b3c
2016-03-04 23:52:13 +08:00
chen-li
c5c50827ee Use "--pub-key" instead of "--pub_key"
Option "--pub_key" is deprecated and will be removed in novaclient 3.3.0.

Change-Id: Iaa6b12cbc3418dce40f689fb4812670784ea3018
2016-03-04 23:43:20 +08:00
OpenStack Proposal Bot
1421d34b8d Updated from global requirements
Change-Id: I08d778537cf3e9d08959772afe4613307cc4b932
2016-03-04 10:19:27 +00:00
Grant Murphy
61a9894527 Add bandit baseline to tox
Bandit baseline will check the last commit to see if
it introduced any new security problems.

Details of how bandit can be configured for the gate are
documented here:

https://wiki.openstack.org/wiki/Security/Projects/Bandit#Gate_Testing_with_Bandit

Change-Id: I791d897c4efe00bc4c0fd3b9d249e561eeb82acb
Partial-Bug: #1552002
2016-03-03 22:42:15 +00:00
German Eichberger
62cb739f8e Adds the Cascade Deelete REST API doc
Change-Id: I7dbbb95ae327abb24a3d25376020be41375a4609
Closes-Bug: #1551436
2016-03-02 13:16:53 -08:00
OpenStack Proposal Bot
79669c925c Updated from global requirements
Change-Id: Ide800fba3f55d6c60012cc474f4bb0d5534e5c77
2016-03-02 04:03:29 +00:00
Jenkins
9fe1056aa7 Merge "glance: support relying on tags to extract image id" 2016-03-01 23:06:06 +00:00
Ihar Hrachyshka
fb53fe2340 glance: support relying on tags to extract image id
Deprecated amp_image_id option with the new amp_image_tag option.

Also switched devstack plugin to rely on the tag to update the image
used for new load balancers.

Implements: blueprint use-glance-tags-to-manage-image
Change-Id: Ibc28b2220565667e15ca2b2674e55074d6126ec3
2016-03-01 20:43:33 +01:00
Stephen Balukoff
feb7a375fc Add release notes for L7 and shared pools
The previously-merged patches for L7 and shared pools did not include
release notes. This commit adds the missing release notes.

Change-Id: I0c216addf9e85d512fd2fe689db1e819d183b36c
Partially-Implements: blueprint lbaas-l7-rules
2016-02-29 22:48:56 -08:00