Fix E12x warnings found by Pep8 1.4.6
These are missed due to bugs in 1.4.5. Closes-Bug: #1267994 Change-Id: Ic7b37abf757a9b7b0c8306c941949dee93b83e08
This commit is contained in:
		| @@ -241,8 +241,8 @@ class OpenStackIdentityShell(object): | ||||
|                                  "determine whether a token has expired " | ||||
|                                  "when retrieving it from keyring. This " | ||||
|                                  "is useful in mitigating process or " | ||||
|                                  "network delays. Default is %s seconds." % ( | ||||
|                             access.STALE_TOKEN_DURATION)) | ||||
|                                  "network delays. Default is %s seconds." % | ||||
|                                  access.STALE_TOKEN_DURATION) | ||||
|  | ||||
|         return parser | ||||
|  | ||||
|   | ||||
| @@ -146,8 +146,8 @@ class ManagerTest(utils.TestCase): | ||||
|         self.client.patch = self.mox.CreateMockAnything() | ||||
|         self.client.put = self.mox.CreateMockAnything() | ||||
|         self.client.patch( | ||||
|             self.url, body=self.body, management=False).AndReturn( | ||||
|                 (None, self.body)) | ||||
|             self.url, body=self.body, management=False).AndReturn((None, | ||||
|                                                                    self.body)) | ||||
|         self.client.put(self.url, body=None, management=True).AndReturn( | ||||
|             (None, self.body)) | ||||
|         self.mox.ReplayAll() | ||||
|   | ||||
| @@ -27,49 +27,53 @@ UNSCOPED_TOKEN = { | ||||
|                } | ||||
| } | ||||
|  | ||||
| _TENANT_ID = '225da22d3ce34b15877ea70b2a575f58' | ||||
|  | ||||
| PROJECT_SCOPED_TOKEN = { | ||||
|     'access': { | ||||
|         'serviceCatalog': [{ | ||||
|             'endpoints': [{ | ||||
|     'adminURL': 'http://admin:8776/v1/225da22d3ce34b15877ea70b2a575f58', | ||||
|     'internalURL': | ||||
|     'http://internal:8776/v1/225da22d3ce34b15877ea70b2a575f58', | ||||
|     'publicURL': | ||||
|     'http://public.com:8776/v1/225da22d3ce34b15877ea70b2a575f58', | ||||
|     'region': 'RegionOne' | ||||
|                 'adminURL': 'http://admin:8776/v1/%s' % _TENANT_ID, | ||||
|                 'internalURL': 'http://internal:8776/v1/%s' % _TENANT_ID, | ||||
|                 'publicURL': 'http://public.com:8776/v1/%s' % _TENANT_ID, | ||||
|                 'region': 'RegionOne' | ||||
|             }], | ||||
|             'endpoints_links': [], | ||||
|             'name': 'Volume Service', | ||||
|             'type': 'volume'}, | ||||
|             {'endpoints': [{ | ||||
|     'adminURL': 'http://admin:9292/v1', | ||||
|     'internalURL': 'http://internal:9292/v1', | ||||
|     'publicURL': 'http://public.com:9292/v1', | ||||
|     'region': 'RegionOne'}], | ||||
|                 'adminURL': 'http://admin:9292/v1', | ||||
|                 'internalURL': 'http://internal:9292/v1', | ||||
|                 'publicURL': 'http://public.com:9292/v1', | ||||
|                 'region': 'RegionOne' | ||||
|             }], | ||||
|                 'endpoints_links': [], | ||||
|                 'name': 'Image Service', | ||||
|                 'type': 'image'}, | ||||
|             {'endpoints': [{ | ||||
| 'adminURL': 'http://admin:8774/v2/225da22d3ce34b15877ea70b2a575f58', | ||||
| 'internalURL': 'http://internal:8774/v2/225da22d3ce34b15877ea70b2a575f58', | ||||
| 'publicURL': 'http://public.com:8774/v2/225da22d3ce34b15877ea70b2a575f58', | ||||
| 'region': 'RegionOne'}], | ||||
|                 'adminURL': 'http://admin:8774/v2/%s' % _TENANT_ID, | ||||
|                 'internalURL': 'http://internal:8774/v2/%s' % _TENANT_ID, | ||||
|                 'publicURL': 'http://public.com:8774/v2/%s' % _TENANT_ID, | ||||
|                 'region': 'RegionOne' | ||||
|             }], | ||||
|                 'endpoints_links': [], | ||||
|                 'name': 'Compute Service', | ||||
|                 'type': 'compute'}, | ||||
|             {'endpoints': [{ | ||||
| 'adminURL': 'http://admin:8773/services/Admin', | ||||
| 'internalURL': 'http://internal:8773/services/Cloud', | ||||
| 'publicURL': 'http://public.com:8773/services/Cloud', | ||||
| 'region': 'RegionOne'}], | ||||
|                 'adminURL': 'http://admin:8773/services/Admin', | ||||
|                 'internalURL': 'http://internal:8773/services/Cloud', | ||||
|                 'publicURL': 'http://public.com:8773/services/Cloud', | ||||
|                 'region': 'RegionOne' | ||||
|             }], | ||||
|                 'endpoints_links': [], | ||||
|                 'name': 'EC2 Service', | ||||
|                 'type': 'ec2'}, | ||||
|             {'endpoints': [{ | ||||
| 'adminURL': 'http://admin:35357/v2.0', | ||||
| 'internalURL': 'http://internal:5000/v2.0', | ||||
| 'publicURL': 'http://public.com:5000/v2.0', | ||||
| 'region': 'RegionOne'}], | ||||
|                 'adminURL': 'http://admin:35357/v2.0', | ||||
|                 'internalURL': 'http://internal:5000/v2.0', | ||||
|                 'publicURL': 'http://public.com:5000/v2.0', | ||||
|                 'region': 'RegionOne' | ||||
|             }], | ||||
|                 'endpoints_links': [], | ||||
|                 'name': 'Identity Service', | ||||
|                 'type': 'identity'}], | ||||
|   | ||||
| @@ -99,7 +99,7 @@ class FakeHTTPClient(fakes.FakeClient): | ||||
|                          {"tenantId": "1", | ||||
|                           "id": "3", | ||||
|                           "name": "Member"}], | ||||
|                  "name": "joeuser"}} | ||||
|                      "name": "joeuser"}} | ||||
|              } | ||||
|         ] | ||||
|         return (200, body) | ||||
| @@ -116,11 +116,10 @@ class FakeHTTPClient(fakes.FakeClient): | ||||
|                  {"name": "joeuser", | ||||
|                   "tenantName": "customer-x", | ||||
|                   "id": "1", | ||||
|                   "roles": [ | ||||
|                   {"serviceId": "1", | ||||
|                           "id": "3", | ||||
|                           "name": "Member"}], | ||||
|                  "tenantId": "1"}} | ||||
|                   "roles": [{"serviceId": "1", | ||||
|                              "id": "3", | ||||
|                              "name": "Member"}], | ||||
|                   "tenantId": "1"}} | ||||
|              } | ||||
|         ] | ||||
|         return (200, body) | ||||
| @@ -183,28 +182,30 @@ class FakeHTTPClient(fakes.FakeClient): | ||||
|     def get(self, **kw): | ||||
|         body = { | ||||
|             "version": { | ||||
|             "id": "v2.0", | ||||
|             "status": "beta", | ||||
|             "updated": "2011-11-19T00:00:00Z", | ||||
|             "links": [ | ||||
|                 {"rel": "self", | ||||
|                  "href": "http://127.0.0.1:35357/v2.0/"}, | ||||
|                 {"rel": "describedby", | ||||
|                  "type": "text/html", | ||||
|                  "href": "http://docs.openstack.org/" | ||||
|                          "api/openstack-identity-service/2.0/content/"}, | ||||
|                 {"rel": "describedby", | ||||
|                  "type": "application/pdf", | ||||
|                  "href": "http://docs.openstack.org/api/" | ||||
|                  "openstack-identity-service/2.0/identity-dev-guide-2.0.pdf"}, | ||||
|                 {"rel": "describedby", | ||||
|                  "type": "application/vnd.sun.wadl+xml", | ||||
|                  "href": "http://127.0.0.1:35357/v2.0/identity-admin.wadl"}], | ||||
|             "media-types": [ | ||||
|                 {"base": "application/xml", | ||||
|                  "type": "application/vnd.openstack.identity-v2.0+xml"}, | ||||
|                 {"base": "application/json", | ||||
|                  "type": "application/vnd.openstack.identity-v2.0+json"}] | ||||
|                 "id": "v2.0", | ||||
|                 "status": "beta", | ||||
|                 "updated": "2011-11-19T00:00:00Z", | ||||
|                 "links": [ | ||||
|                     {"rel": "self", | ||||
|                      "href": "http://127.0.0.1:35357/v2.0/"}, | ||||
|                     {"rel": "describedby", | ||||
|                      "type": "text/html", | ||||
|                      "href": "http://docs.openstack.org/" | ||||
|                             "api/openstack-identity-service/2.0/content/"}, | ||||
|                     {"rel": "describedby", | ||||
|                      "type": "application/pdf", | ||||
|                      "href": "http://docs.openstack.org/api/" | ||||
|                      "openstack-identity-service/2.0/" | ||||
|                      "identity-dev-guide-2.0.pdf"}, | ||||
|                     {"rel": "describedby", | ||||
|                      "type": "application/vnd.sun.wadl+xml", | ||||
|                      "href": | ||||
|                      "http://127.0.0.1:35357/v2.0/identity-admin.wadl"}], | ||||
|                 "media-types": [ | ||||
|                     {"base": "application/xml", | ||||
|                      "type": "application/vnd.openstack.identity-v2.0+xml"}, | ||||
|                     {"base": "application/json", | ||||
|                      "type": "application/vnd.openstack.identity-v2.0+json"}] | ||||
|             } | ||||
|         } | ||||
|         return (200, body) | ||||
| @@ -418,14 +419,14 @@ class FakeHTTPClient(fakes.FakeClient): | ||||
|     def get_OS_KSADM_services(self, **kw): | ||||
|         body = { | ||||
|             "OS-KSADM:services": [ | ||||
|             {"description": None, | ||||
|              "type": "compute", | ||||
|              "id": "1", | ||||
|              "name": "service1"}, | ||||
|             {"description": None, | ||||
|              "type": "identity", | ||||
|              "id": "2", | ||||
|              "name": "service2"}] | ||||
|                 {"description": None, | ||||
|                  "type": "compute", | ||||
|                  "id": "1", | ||||
|                  "name": "service1"}, | ||||
|                 {"description": None, | ||||
|                  "type": "identity", | ||||
|                  "id": "2", | ||||
|                  "name": "service2"}] | ||||
|         } | ||||
|         return (200, body) | ||||
|  | ||||
|   | ||||
| @@ -70,7 +70,7 @@ class RoleTests(utils.TestCase, utils.CrudTests): | ||||
|  | ||||
|         self.stub_entity(httpretty.GET, | ||||
|                          ['domains', domain_id, 'users', user_id, | ||||
|                          self.collection_key], entity=ref_list) | ||||
|                           self.collection_key], entity=ref_list) | ||||
|  | ||||
|         self.manager.list(domain=domain_id, user=user_id) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Dirk Mueller
					Dirk Mueller