summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--tempest_lib/api_schema/response/compute/v2_1/images.py4
-rw-r--r--tempest_lib/common/ssh.py2
-rw-r--r--tempest_lib/services/identity/v2/token_client.py2
-rw-r--r--tempest_lib/services/identity/v3/token_client.py2
-rw-r--r--tempest_lib/services/network/extensions_client.py24
-rw-r--r--tempest_lib/services/network/security_group_rules_client.py33
-rw-r--r--tempest_lib/tests/services/identity/__init__.py0
-rw-r--r--tempest_lib/tests/services/identity/v2/test_token_client.py4
-rw-r--r--tempest_lib/tests/services/identity/v3/test_token_client.py4
10 files changed, 67 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 5ed7af8..68687b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,7 @@
*.so
# Packages
-*.egg
+*.egg*
*.egg-info
dist
build
diff --git a/tempest_lib/api_schema/response/compute/v2_1/images.py b/tempest_lib/api_schema/response/compute/v2_1/images.py
index b8c4151..41aceaf 100644
--- a/tempest_lib/api_schema/response/compute/v2_1/images.py
+++ b/tempest_lib/api_schema/response/compute/v2_1/images.py
@@ -26,7 +26,7 @@ common_image_schema = {
'status': {'type': 'string'},
'updated': {'type': 'string'},
'links': image_links,
- 'name': {'type': 'string'},
+ 'name': {'type': ['string', 'null']},
'created': {'type': 'string'},
'minDisk': {'type': 'integer'},
'minRam': {'type': 'integer'},
@@ -41,7 +41,7 @@ common_image_schema = {
'additionalProperties': False,
'required': ['id', 'links']
},
- 'OS-EXT-IMG-SIZE:size': {'type': 'integer'},
+ 'OS-EXT-IMG-SIZE:size': {'type': ['integer', 'null']},
'OS-DCF:diskConfig': {'type': 'string'}
},
'additionalProperties': False,
diff --git a/tempest_lib/common/ssh.py b/tempest_lib/common/ssh.py
index 687c054..e55d359 100644
--- a/tempest_lib/common/ssh.py
+++ b/tempest_lib/common/ssh.py
@@ -73,7 +73,7 @@ class Client(object):
look_for_keys=self.look_for_keys,
key_filename=self.key_filename,
timeout=self.channel_timeout, pkey=self.pkey)
- LOG.info("ssh connection to %s@%s successfuly created",
+ LOG.info("ssh connection to %s@%s successfully created",
self.username, self.host)
return ssh
except (EOFError,
diff --git a/tempest_lib/services/identity/v2/token_client.py b/tempest_lib/services/identity/v2/token_client.py
index 10c437c..741bf9f 100644
--- a/tempest_lib/services/identity/v2/token_client.py
+++ b/tempest_lib/services/identity/v2/token_client.py
@@ -50,7 +50,7 @@ class TokenClient(rest_client.RestClient):
if tenant:
creds['auth']['tenantName'] = tenant
- body = json.dumps(creds)
+ body = json.dumps(creds, sort_keys=True)
resp, body = self.post(self.auth_url, body=body)
self.expected_success(200, resp.status)
diff --git a/tempest_lib/services/identity/v3/token_client.py b/tempest_lib/services/identity/v3/token_client.py
index 504b165..c030bba 100644
--- a/tempest_lib/services/identity/v3/token_client.py
+++ b/tempest_lib/services/identity/v3/token_client.py
@@ -116,7 +116,7 @@ class V3TokenClient(rest_client.RestClient):
elif domain_name:
creds['auth']['scope'] = dict(domain={'name': domain_name})
- body = json.dumps(creds)
+ body = json.dumps(creds, sort_keys=True)
resp, body = self.post(self.auth_url, body=body)
self.expected_success(201, resp.status)
return rest_client.ResponseBody(resp, body)
diff --git a/tempest_lib/services/network/extensions_client.py b/tempest_lib/services/network/extensions_client.py
new file mode 100644
index 0000000..420848b
--- /dev/null
+++ b/tempest_lib/services/network/extensions_client.py
@@ -0,0 +1,24 @@
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+from tempest_lib.services.network import base
+
+
+class ExtensionsClient(base.BaseNetworkClient):
+
+ def show_extension(self, ext_alias, **fields):
+ uri = '/extensions/%s' % ext_alias
+ return self.show_resource(uri, **fields)
+
+ def list_extensions(self, **filters):
+ uri = '/extensions'
+ return self.list_resources(uri, **filters)
diff --git a/tempest_lib/services/network/security_group_rules_client.py b/tempest_lib/services/network/security_group_rules_client.py
new file mode 100644
index 0000000..f2b15aa
--- /dev/null
+++ b/tempest_lib/services/network/security_group_rules_client.py
@@ -0,0 +1,33 @@
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+from tempest_lib.services.network import base
+
+
+class SecurityGroupRulesClient(base.BaseNetworkClient):
+
+ def create_security_group_rule(self, **kwargs):
+ uri = '/security-group-rules'
+ post_data = {'security_group_rule': kwargs}
+ return self.create_resource(uri, post_data)
+
+ def show_security_group_rule(self, security_group_rule_id, **fields):
+ uri = '/security-group-rules/%s' % security_group_rule_id
+ return self.show_resource(uri, **fields)
+
+ def delete_security_group_rule(self, security_group_rule_id):
+ uri = '/security-group-rules/%s' % security_group_rule_id
+ return self.delete_resource(uri)
+
+ def list_security_group_rules(self, **filters):
+ uri = '/security-group-rules'
+ return self.list_resources(uri, **filters)
diff --git a/tempest_lib/tests/services/identity/__init__.py b/tempest_lib/tests/services/identity/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tempest_lib/tests/services/identity/__init__.py
diff --git a/tempest_lib/tests/services/identity/v2/test_token_client.py b/tempest_lib/tests/services/identity/v2/test_token_client.py
index f75bef8..57e439c 100644
--- a/tempest_lib/tests/services/identity/v2/test_token_client.py
+++ b/tempest_lib/tests/services/identity/v2/test_token_client.py
@@ -48,7 +48,7 @@ class TestTokenClientV2(base.TestCase):
'password': 'fake_pass',
},
}
- })
+ }, sort_keys=True)
post_mock.mock.assert_called_once_with('fake_url/tokens',
body=req_dict)
@@ -67,7 +67,7 @@ class TestTokenClientV2(base.TestCase):
'password': 'fake_pass',
},
}
- })
+ }, sort_keys=True)
post_mock.mock.assert_called_once_with('fake_url/tokens',
body=req_dict)
diff --git a/tempest_lib/tests/services/identity/v3/test_token_client.py b/tempest_lib/tests/services/identity/v3/test_token_client.py
index ed82b87..44cc8e2 100644
--- a/tempest_lib/tests/services/identity/v3/test_token_client.py
+++ b/tempest_lib/tests/services/identity/v3/test_token_client.py
@@ -53,7 +53,7 @@ class TestTokenClientV2(base.TestCase):
}
},
}
- })
+ }, sort_keys=True)
post_mock.mock.assert_called_once_with('fake_url/auth/tokens',
body=req_dict)
@@ -81,7 +81,7 @@ class TestTokenClientV2(base.TestCase):
}
},
}
- })
+ }, sort_keys=True)
post_mock.mock.assert_called_once_with('fake_url/auth/tokens',
body=req_dict)