Compare commits

...

12 Commits
8.0.0 ... 3.1.1

Author SHA1 Message Date
Jenkins
c1701c1d28 Merge "Do not allow name lookups on RBAC policies" into stable/liberty 2015-12-08 02:14:20 +00:00
Cedric Brandily
c5e1d2b827 Ensure to decode bytes or fail
The commit fcf289797c introduces the
pattern:

  if isinstance(line, bytes):
    try:
      line = line.decode(encoding='utf-8')
    except UnicodeError:
      pass
  # concat line with a string

which is not working in PY3K if an UnicodeError is raised because line
is not decoded and concatened to a string.

This change delegates decoding to safe_decode[1] which returns a text
object or raises an error.

[1] oslo_utils.encodeutils

Closes-Bug: #1503415
Related-Bug: #1499004
Change-Id: I16b8013f33aa3efad65be8040d3210120e047bbd
(cherry picked from commit 88eb5845b7)
2015-12-03 19:51:44 +09:00
Kevin Benton
67d1b49ef2 Do not allow name lookups on RBAC policies
RBAC policies have no name field so the name query to
the server was always returning all entries since the
name filter was ignored.

This corrects the behavior by disabling the name lookup
for RBAC policies.

Change-Id: I6c5afa05cefb1709e9667a1aaf20105c707dc95c
Closes-Bug: #1517818
(cherry picked from commit 529d3f5a3c)
2015-12-02 17:55:54 +00:00
OpenStack Proposal Bot
c816799185 Updated from global requirements
Change-Id: Ie03d73ec35e59d5a5158241b5557d9d393eb851f
2015-11-17 03:19:03 +00:00
OpenStack Proposal Bot
ac031aa5f0 Updated from global requirements
Change-Id: Ic2872ec697fada6a59447b7d7ada616343f1afb6
2015-10-19 22:15:02 +00:00
Jenkins
1c51c15b22 Merge "Revert parent_id and obj_id parameter order" into stable/liberty 2015-10-19 15:42:15 +00:00
Thomas Morin
05908356a7 Revert parent_id and obj_id parameter order
This change reverts the parameter order between parent_id and
object id in the definition of obj_updater, obj_deleter, and obj_shower
in neutronclient/v2_0/client.py, to match the call order in
neutronclient/neutron/v2_0/__init__.py .

Fixing the caller code would be the alternative, but would require
changing the sig of many non-dynmically created methods in
neutronclient/v2_0/client.py .

Change-Id: Ia5d499e5a3cf3ff1b357c954f7e82a9066c94982
Closes-Bug: 1505170
(cherry picked from commit 1ced38c1a7)
2015-10-16 10:10:01 +00:00
OpenStack Proposal Bot
eb97444c89 Updated from global requirements
Change-Id: I551d067be8a2d39b94df303056ffd0ce7578d7f9
2015-10-13 09:55:54 +00:00
Jenkins
da14399062 Merge "Update .gitreview for stable/liberty" into stable/liberty 2015-10-07 22:07:28 +00:00
Clark Boylan
c5d04c9f5c Let devstack-gate handle the gate hook timeout
Devstack gate now handles all of the hook timeouts itself so that
individual jobs do not need to reinvent this wheel. Remove the timeout
support from the functional test gate hook here as a result.

(cherry picked from commit 21abe4ba34)

Conflicts:
	neutronclient/tests/functional/hooks/gate_hook.sh

Depends-on: I8549db52fa5b752202ac7f019b3e1931a697e337
Change-Id: I3819978b04faea5712c995cbe277ae42870acba9
2015-10-07 03:15:20 +00:00
Henry Gessau
db7eb55740 Py3k compliance: check for bytes when making a string
When faking stdout in tests we must account for the case when
"strings" might be bytes, which python3 cares about.

Change-Id: I0e9349c86371055eed479799d39ab6adbcad6f95
Closes-Bug: #1499004
(cherry picked from commit fcf289797c)
2015-09-24 08:59:52 +00:00
Doug Hellmann
ef326ae3ff Update .gitreview for stable/liberty
Change-Id: Ia2509f6b11826b206484855cb75ac6a2fa8f6c39
2015-09-22 16:48:52 +00:00
6 changed files with 13 additions and 12 deletions

View File

@@ -2,3 +2,4 @@
host=review.openstack.org
port=29418
project=openstack/python-neutronclient.git
defaultbranch=stable/liberty

View File

@@ -32,12 +32,14 @@ class ListRBACPolicy(neutronV20.ListCommand):
list_columns = ['id', 'object_id']
pagination_support = True
sorting_support = True
allow_names = False
class ShowRBACPolicy(neutronV20.ShowCommand):
"""Show information of a given RBAC policy."""
resource = 'rbac_policy'
allow_names = False
class CreateRBACPolicy(neutronV20.CreateCommand):
@@ -81,6 +83,7 @@ class UpdateRBACPolicy(neutronV20.UpdateCommand):
"""Update RBAC policy for given tenant."""
resource = 'rbac_policy'
allow_names = False
def add_known_arguments(self, parser):
parser.add_argument(
@@ -100,3 +103,4 @@ class DeleteRBACPolicy(neutronV20.DeleteCommand):
"""Delete a RBAC policy."""
resource = 'rbac_policy'
allow_names = False

View File

@@ -1,16 +1,12 @@
#!/usr/bin/env bash
set -ex
VENV=${1:-"functional"}
if [ "$VENV" == "functional-vpn" ]
then
export DEVSTACK_LOCAL_CONFIG="enable_plugin neutron-vpnaas git://git.openstack.org/openstack/neutron-vpnaas"
fi
remaining_time
timeout -s 9 ${REMAINING_TIME}m $BASE/new/devstack-gate/devstack-vm-gate.sh
$BASE/new/devstack-gate/devstack-vm-gate.sh

View File

@@ -73,7 +73,7 @@ class FakeStdout(object):
def make_string(self):
result = ''
for line in self.content:
result = result + line
result += encodeutils.safe_decode(line, 'utf-8')
return result

View File

@@ -1716,7 +1716,7 @@ class Client(ClientBase):
def _fx(obj, **_params):
return self.show_ext(path, obj, **_params)
def _parent_fx(parent_id, obj, **_params):
def _parent_fx(obj, parent_id, **_params):
return self.show_ext(path % parent_id, obj, **_params)
fn = _fx if not parent_resource else _parent_fx
setattr(self, "show_%s" % resource_plural, fn)
@@ -1743,7 +1743,7 @@ class Client(ClientBase):
def _fx(obj):
return self.delete_ext(path, obj)
def _parent_fx(parent_id, obj):
def _parent_fx(obj, parent_id):
return self.delete_ext(path % parent_id, obj)
fn = _fx if not parent_resource else _parent_fx
setattr(self, "delete_%s" % resource_singular, fn)
@@ -1752,7 +1752,7 @@ class Client(ClientBase):
def _fx(obj, body=None):
return self.update_ext(path, obj, body)
def _parent_fx(parent_id, obj, body=None):
def _parent_fx(obj, parent_id, body=None):
return self.update_ext(path % parent_id, obj, body)
fn = _fx if not parent_resource else _parent_fx
setattr(self, "update_%s" % resource_singular, fn)

View File

@@ -8,9 +8,9 @@ iso8601>=0.1.9
netaddr!=0.7.16,>=0.7.12
oslo.i18n>=1.5.0 # Apache-2.0
oslo.serialization>=1.4.0 # Apache-2.0
oslo.utils>=2.0.0 # Apache-2.0
requests>=2.5.2
python-keystoneclient>=1.6.0
oslo.utils!=2.6.0,>=2.0.0 # Apache-2.0
requests!=2.8.0,>=2.5.2
python-keystoneclient!=1.8.0,>=1.6.0
simplejson>=2.2.0
six>=1.9.0
Babel>=1.3