---------------------------------------------------------------------------
Unauthorized Traceback (most recent call last)
<ipython-input-5-d005f3dd3ca5> in <module>()
3 #nc.images.list()
4 #nc.flavors.list()
----> 5 nc.keypairs.findall(name="AJ_Hadoop_Cluster")
6 # with open(os.path.expanduser('~/.ssh/id_rsa.pub')) as fpubkey:
7 #nc.keypairs.create(name="AJ_Hadoop_Cluster", public_key=fpubkey.read())
/Users/ajallow/Python/Cloud_Cost_Estimator/venv/lib/python2.7/site-packages/novaclient/base.pyc in findall(self, **kwargs)
450 searches = [(k, v) for k, v in searches if k != 'deleted']
451
--> 452 listing = self.list(**list_kwargs)
453 found.append_request_ids(listing.request_ids)
454
/Users/ajallow/Python/Cloud_Cost_Estimator/venv/lib/python2.7/site-packages/novaclient/api_versions.pyc in substitution(obj, *args, **kwargs)
368 obj.api_version.get_string(), name)
369
--> 370 return methods[-1].func(obj, *args, **kwargs)
371
372 # Let's share "arguments" with original method and substitution to
/Users/ajallow/Python/Cloud_Cost_Estimator/venv/lib/python2.7/site-packages/novaclient/v2/keypairs.pyc in list(self)
161 Get a list of keypairs.
162 """
--> 163 return self._list('/%s' % self.keypair_prefix, 'keypairs')
164
165 @api_versions.wraps("2.10")
/Users/ajallow/Python/Cloud_Cost_Estimator/venv/lib/python2.7/site-packages/novaclient/base.pyc in _list(self, url, response_key, obj_class, body)
240 resp, body = self.api.client.post(url, body=body)
241 else:
--> 242 resp, body = self.api.client.get(url)
243
244 if obj_class is None:
/Users/ajallow/Python/Cloud_Cost_Estimator/venv/lib/python2.7/site-packages/novaclient/client.pyc in get(self, url, **kwargs)
450
451 def get(self, url, **kwargs):
--> 452 return self._cs_request(url, 'GET', **kwargs)
453
454 def post(self, url, **kwargs):
/Users/ajallow/Python/Cloud_Cost_Estimator/venv/lib/python2.7/site-packages/novaclient/client.pyc in _cs_request(self, url, method, **kwargs)
406 def _cs_request(self, url, method, **kwargs):
407 if not self.management_url:
--> 408 self.authenticate()
409 if url is None:
410 # To get API version information, it is necessary to GET
/Users/ajallow/Python/Cloud_Cost_Estimator/venv/lib/python2.7/site-packages/novaclient/client.pyc in authenticate(self)
563 while auth_url:
564 if not self.auth_system or self.auth_system == 'keystone':
--> 565 auth_url = self._v2_auth(auth_url)
566 else:
567 auth_url = self._plugin_auth(auth_url)
/Users/ajallow/Python/Cloud_Cost_Estimator/venv/lib/python2.7/site-packages/novaclient/client.pyc in _v2_auth(self, url)
654 body['auth']['tenantName'] = self.projectid
655
--> 656 return self._authenticate(url, body)
657
658 def _authenticate(self, url, body, **kwargs):
/Users/ajallow/Python/Cloud_Cost_Estimator/venv/lib/python2.7/site-packages/novaclient/client.pyc in _authenticate(self, url, body, **kwargs)
667 body=body,
668 allow_redirects=True,
--> 669 **kwargs)
670
671 return self._extract_service_catalog(url, resp, respbody)
/Users/ajallow/Python/Cloud_Cost_Estimator/venv/lib/python2.7/site-packages/novaclient/client.pyc in _time_request(self, url, method, **kwargs)
401 def _time_request(self, url, method, **kwargs):
402 with utils.record_time(self.times, self.timings, method, url):
--> 403 resp, body = self.request(url, method, **kwargs)
404 return resp, body
405
/Users/ajallow/Python/Cloud_Cost_Estimator/venv/lib/python2.7/site-packages/novaclient/client.pyc in request(self, url, method, **kwargs)
395 if resp.headers else None)
396 if resp.status_code >= 400:
--> 397 raise exceptions.from_response(resp, body, url, method)
398
399 return resp, body
Unauthorized: The request you have made requires authentication. (HTTP 401)