diff --git a/resources/apache_puppet/test.py b/resources/apache_puppet/test.py index a9f2b72..4cff757 100644 --- a/resources/apache_puppet/test.py +++ b/resources/apache_puppet/test.py @@ -6,6 +6,6 @@ from solar.core.log import log def test(resource): log.debug('Testing apache_puppet') requests.get( - 'http://%s:%s' % (resource.args['ip'].value, 80) + 'http://%s:%s' % (resource.args['ip'], 80) ) diff --git a/resources/cinder_api_puppet/test.py b/resources/cinder_api_puppet/test.py index e1c67ce..3dcbda7 100644 --- a/resources/cinder_api_puppet/test.py +++ b/resources/cinder_api_puppet/test.py @@ -6,5 +6,5 @@ from solar.core.log import log def test(resource): log.debug('Testing cinder_api_puppet') requests.get( - 'http://%s:%s' % (resource.args['ip'].value, resource.args['service_port'].value) + 'http://%s:%s' % (resource.args['ip'], resource.args['service_port']) ) diff --git a/resources/cinder_puppet/test.py b/resources/cinder_puppet/test.py index ec72c3c..46a25da 100644 --- a/resources/cinder_puppet/test.py +++ b/resources/cinder_puppet/test.py @@ -6,5 +6,5 @@ from solar.core.log import log def test(resource): log.debug('Testing cinder_puppet') requests.get( - 'http://%s:%s' % (resource.args['ip'].value, resource.args['port'].value) + 'http://%s:%s' % (resource.args['ip'], resource.args['port']) ) diff --git a/resources/cinder_scheduler_puppet/test.py b/resources/cinder_scheduler_puppet/test.py index 045d5ed..af73ec9 100644 --- a/resources/cinder_scheduler_puppet/test.py +++ b/resources/cinder_scheduler_puppet/test.py @@ -6,7 +6,7 @@ from solar.core.log import log def test(resource): log.debug('Testing cinder_scheduler_puppet') # requests.get( -# 'http://%s:%s' % (resource.args['ip'].value, resource.args['port'].value) +# 'http://%s:%s' % (resource.args['ip'], resource.args['port']) # TODO(bogdando) figure out how to test this # http://docs.openstack.org/developer/nova/devref/scheduler.html # ) diff --git a/resources/cinder_volume_puppet/test.py b/resources/cinder_volume_puppet/test.py index 59bfe81..8c8263d 100644 --- a/resources/cinder_volume_puppet/test.py +++ b/resources/cinder_volume_puppet/test.py @@ -6,7 +6,7 @@ from solar.core.log import log def test(resource): log.debug('Testing cinder_volume_puppet') # requests.get( -# 'http://%s:%s' % (resource.args['ip'].value, resource.args['port'].value) +# 'http://%s:%s' % (resource.args['ip'], resource.args['port']) # TODO(bogdando) figure out how to test this # http://docs.openstack.org/developer/nova/devref/volume.html # ) diff --git a/resources/glance_api_service/test.py b/resources/glance_api_service/test.py index ba87049..e683b55 100644 --- a/resources/glance_api_service/test.py +++ b/resources/glance_api_service/test.py @@ -10,15 +10,15 @@ def test(resource): args = resource.args token, _ = validation.validate_token( - keystone_host=args['keystone_host'].value, - keystone_port=args['keystone_port'].value, + keystone_host=args['keystone_host'], + keystone_port=args['keystone_port'], user='glance_admin', tenant='services', - password=args['keystone_password'].value, + password=args['keystone_password'], ) images = requests.get( - 'http://%s:%s/v1/images' % (resource.args['ip'].value, 9393), + 'http://%s:%s/v1/images' % (resource.args['ip'], 9393), headers={'X-Auth-Token': token} ) assert images.json() == {'images': []} diff --git a/resources/glance_puppet/test.py b/resources/glance_puppet/test.py index e6fece1..03d64d1 100644 --- a/resources/glance_puppet/test.py +++ b/resources/glance_puppet/test.py @@ -7,16 +7,16 @@ from solar.core import validation def test(resource): log.debug('Testing glance_puppet') requests.get( - 'http://%s:%s' % (resource.args['ip'].value, resource.args['bind_port'].value) + 'http://%s:%s' % (resource.args['ip'], resource.args['bind_port']) ) #TODO(bogdando) test packages installed and filesystem store datadir created args = resource.args token, _ = validation.validate_token( - keystone_host=args['keystone_host'].value, - keystone_port=args['keystone_port'].value, - user=args['keystone_user'].value, - tenant=args['keystone_tenant'].value, - password=args['keystone_password'].value, + keystone_host=args['keystone_host'], + keystone_port=args['keystone_port'], + user=args['keystone_user'], + tenant=args['keystone_tenant'], + password=args['keystone_password'], ) diff --git a/resources/glance_registry_puppet/test.py b/resources/glance_registry_puppet/test.py index 9c1d84b..3374e0e 100644 --- a/resources/glance_registry_puppet/test.py +++ b/resources/glance_registry_puppet/test.py @@ -6,5 +6,5 @@ from solar.core.log import log def test(resource): log.debug('Testing glance_registry_puppet') requests.get( - 'http://%s:%s' % (resource.args['ip'].value, resource.args['bind_port'].value) + 'http://%s:%s' % (resource.args['ip'], resource.args['bind_port']) ) diff --git a/resources/haproxy_service/test.py b/resources/haproxy_service/test.py index e760508..426e677 100644 --- a/resources/haproxy_service/test.py +++ b/resources/haproxy_service/test.py @@ -6,5 +6,5 @@ from solar.core.log import log def test(resource): log.debug('Testing haproxy_service') requests.get( - 'http://%s:%s' % (resource.args['ip'].value, resource.args['ports'].value[0]['value'][0]['value']) + 'http://%s:%s' % (resource.args['ip'], resource.args['ports'][0][0]) ) diff --git a/resources/keystone_puppet/test.py b/resources/keystone_puppet/test.py index a82c8ea..6767311 100644 --- a/resources/keystone_puppet/test.py +++ b/resources/keystone_puppet/test.py @@ -6,5 +6,5 @@ from solar.core.log import log def test(resource): log.debug('Testing keystone_puppet') requests.get( - 'http://%s:%s' % (resource.args['ip'].value, resource.args['port'].value) + 'http://%s:%s' % (resource.args['ip'], resource.args['port']) ) diff --git a/resources/keystone_service/test.py b/resources/keystone_service/test.py index fb3d57e..26268c7 100644 --- a/resources/keystone_service/test.py +++ b/resources/keystone_service/test.py @@ -6,5 +6,5 @@ from solar.core.log import log def test(resource): log.debug('Testing keystone_service') requests.get( - 'http://%s:%s' % (resource.args['ip'].value, resource.args['port'].value) + 'http://%s:%s' % (resource.args['ip'], resource.args['port']) ) diff --git a/resources/keystone_service_endpoint/test.py b/resources/keystone_service_endpoint/test.py index 1981912..7333134 100644 --- a/resources/keystone_service_endpoint/test.py +++ b/resources/keystone_service_endpoint/test.py @@ -9,26 +9,26 @@ def test(resource): log.debug('Testing keystone_service_endpoint %s', resource.name) resp = requests.get( - 'http://%s:%s/v3/services' % (resource.args['ip'].value, resource.args['keystone_admin_port'].value), + 'http://%s:%s/v3/services' % (resource.args['ip'], resource.args['keystone_admin_port']), headers={ - 'X-Auth-Token': resource.args['admin_token'].value, + 'X-Auth-Token': resource.args['admin_token'], } ) resp_json = resp.json() assert 'services' in resp_json - service = [s for s in resp_json['services'] if s['name'] == resource.args['endpoint_name'].value][0] + service = [s for s in resp_json['services'] if s['name'] == resource.args['endpoint_name']][0] service_id = service['id'] - assert service['description'] == resource.args['description'].value + assert service['description'] == resource.args['description'] log.debug('%s service: %s', resource.name, json.dumps(service, indent=2)) resp = requests.get( - 'http://%s:%s/v3/endpoints' % (resource.args['ip'].value, resource.args['keystone_admin_port'].value), + 'http://%s:%s/v3/endpoints' % (resource.args['ip'], resource.args['keystone_admin_port']), headers={ - 'X-Auth-Token': resource.args['admin_token'].value, + 'X-Auth-Token': resource.args['admin_token'], } ) @@ -41,9 +41,8 @@ def test(resource): if endpoint['service_id'] == service_id: endpoints[endpoint['interface']] = endpoint - assert jinja2.Template(resource.args['adminurl'].value).render(**resource.args_dict()) == endpoints['admin']['url'] - assert jinja2.Template(resource.args['internalurl'].value).render(**resource.args_dict()) == endpoints['internal']['url'] - assert jinja2.Template(resource.args['publicurl'].value).render(**resource.args_dict()) == endpoints['public']['url'] + assert jinja2.Template(resource.args['adminurl']).render(**resource.args_dict()) == endpoints['admin']['url'] + assert jinja2.Template(resource.args['internalurl']).render(**resource.args_dict()) == endpoints['internal']['url'] + assert jinja2.Template(resource.args['publicurl']).render(**resource.args_dict()) == endpoints['public']['url'] log.debug('%s endpoints: %s', resource.name, json.dumps(endpoints, indent=2)) - diff --git a/resources/keystone_user/test.py b/resources/keystone_user/test.py index f37f375..21054dd 100644 --- a/resources/keystone_user/test.py +++ b/resources/keystone_user/test.py @@ -5,14 +5,14 @@ from solar.core import validation def test(resource): - log.debug('Testing keystone_user %s', resource.args['user_name'].value) + log.debug('Testing keystone_user %s', resource.args['user_name']) args = resource.args token, _ = validation.validate_token( - keystone_host=args['keystone_host'].value, - keystone_port=args['keystone_port'].value, - user=args['user_name'].value, - tenant=args['tenant_name'].value, - password=args['user_password'].value, + keystone_host=args['keystone_host'], + keystone_port=args['keystone_port'], + user=args['user_name'], + tenant=args['tenant_name'], + password=args['user_password'], ) diff --git a/resources/nova_api_puppet/test.py b/resources/nova_api_puppet/test.py index ca32863..f089c3d 100644 --- a/resources/nova_api_puppet/test.py +++ b/resources/nova_api_puppet/test.py @@ -11,11 +11,11 @@ def test(resource): args = resource.args token, token_data = validation.validate_token( - keystone_host=args['auth_host'].value, - keystone_port=args['auth_port'].value, - user=args['admin_user'].value, - tenant=args['admin_tenant_name'].value, - password=args['admin_password'].value, + keystone_host=args['auth_host'], + keystone_port=args['auth_port'], + user=args['admin_user'], + tenant=args['admin_tenant_name'], + password=args['admin_password'], ) endpoints = [ @@ -89,4 +89,3 @@ def test(resource): ) log.debug('NOVA API IMAGES: %s', images.json()) -