Merge "Remove hyphen from rand_name calls in baremetal tests"
diff --git a/tempest/api_schema/response/compute/v2_1/floating_ips.py b/tempest/api_schema/response/compute/v2_1/floating_ips.py
index 7250773..7369bec 100644
--- a/tempest/api_schema/response/compute/v2_1/floating_ips.py
+++ b/tempest/api_schema/response/compute/v2_1/floating_ips.py
@@ -12,6 +12,28 @@
# License for the specific language governing permissions and limitations
# under the License.
+common_floating_ip_info = {
+ 'type': 'object',
+ 'properties': {
+ # NOTE: Now the type of 'id' is integer, but
+ # here allows 'string' also because we will be
+ # able to change it to 'uuid' in the future.
+ 'id': {'type': ['integer', 'string']},
+ 'pool': {'type': ['string', 'null']},
+ 'instance_id': {'type': ['string', 'null']},
+ 'ip': {
+ 'type': 'string',
+ 'format': 'ip-address'
+ },
+ 'fixed_ip': {
+ 'type': ['string', 'null'],
+ 'format': 'ip-address'
+ }
+ },
+ 'required': ['id', 'pool', 'instance_id',
+ 'ip', 'fixed_ip'],
+
+}
list_floating_ips = {
'status_code': [200],
'response_body': {
@@ -19,29 +41,10 @@
'properties': {
'floating_ips': {
'type': 'array',
- 'items': {
- 'type': 'object',
- 'properties': {
- # NOTE: Now the type of 'id' is integer, but
- # here allows 'string' also because we will be
- # able to change it to 'uuid' in the future.
- 'id': {'type': ['integer', 'string']},
- 'pool': {'type': ['string', 'null']},
- 'instance_id': {'type': ['string', 'null']},
- 'ip': {
- 'type': 'string',
- 'format': 'ip-address'
- },
- 'fixed_ip': {
- 'type': ['string', 'null'],
- 'format': 'ip-address'
- }
- },
- 'required': ['id', 'pool', 'instance_id', 'ip', 'fixed_ip']
- }
- }
+ 'items': common_floating_ip_info
+ },
},
- 'required': ['floating_ips']
+ 'required': ['floating_ips'],
}
}
@@ -50,28 +53,9 @@
'response_body': {
'type': 'object',
'properties': {
- 'floating_ip': {
- 'type': 'object',
- 'properties': {
- # NOTE: Now the type of 'id' is integer, but here allows
- # 'string' also because we will be able to change it to
- # 'uuid' in the future.
- 'id': {'type': ['integer', 'string']},
- 'pool': {'type': ['string', 'null']},
- 'instance_id': {'type': ['string', 'null']},
- 'ip': {
- 'type': 'string',
- 'format': 'ip-address'
- },
- 'fixed_ip': {
- 'type': ['string', 'null'],
- 'format': 'ip-address'
- }
- },
- 'required': ['id', 'pool', 'instance_id', 'ip', 'fixed_ip']
- }
+ 'floating_ip': common_floating_ip_info
},
- 'required': ['floating_ip']
+ 'required': ['floating_ip'],
}
}
@@ -87,11 +71,11 @@
'properties': {
'name': {'type': 'string'}
},
- 'required': ['name']
+ 'required': ['name'],
}
}
},
- 'required': ['floating_ip_pools']
+ 'required': ['floating_ip_pools'],
}
}
@@ -111,10 +95,10 @@
'ip_range': {'type': 'string'},
'pool': {'type': ['string', 'null']},
},
- 'required': ['interface', 'ip_range', 'pool']
+ 'required': ['interface', 'ip_range', 'pool'],
}
},
- 'required': ['floating_ips_bulk_create']
+ 'required': ['floating_ips_bulk_create'],
}
}
@@ -125,7 +109,7 @@
'properties': {
'floating_ips_bulk_delete': {'type': 'string'}
},
- 'required': ['floating_ips_bulk_delete']
+ 'required': ['floating_ips_bulk_delete'],
}
}
@@ -155,10 +139,10 @@
# NOTE: fixed_ip is introduced after JUNO release,
# So it is not defined as 'required'.
'required': ['address', 'instance_uuid', 'interface',
- 'pool', 'project_id']
+ 'pool', 'project_id'],
}
}
},
- 'required': ['floating_ip_info']
+ 'required': ['floating_ip_info'],
}
}
diff --git a/tempest/common/cred_provider.py b/tempest/common/cred_provider.py
index b0300cb..9630d1c 100644
--- a/tempest/common/cred_provider.py
+++ b/tempest/common/cred_provider.py
@@ -63,7 +63,8 @@
params[attr] = getattr(_section, prefix + "_" + attr)
# Build and validate credentials. We are reading configured credentials,
# so validate them even if fill_in is False
- credentials = get_credentials(fill_in=fill_in, **params)
+ credentials = get_credentials(fill_in=fill_in,
+ identity_version=identity_version, **params)
if not fill_in:
if not credentials.is_valid():
msg = ("The %s credentials are incorrectly set in the config file."
diff --git a/tempest/common/utils/linux/remote_client.py b/tempest/common/utils/linux/remote_client.py
index 1f1414f..b19faef 100644
--- a/tempest/common/utils/linux/remote_client.py
+++ b/tempest/common/utils/linux/remote_client.py
@@ -145,7 +145,7 @@
def _renew_lease_dhclient(self, fixed_ip=None):
"""Renews DHCP lease via dhclient client. """
- cmd = "sudo /sbin/dhclient -r && /sbin/dhclient"
+ cmd = "sudo /sbin/dhclient -r && sudo /sbin/dhclient"
self.exec_command(cmd)
def renew_lease(self, fixed_ip=None):