Avoid storing project_id on class instances

As of I40d0e8b6a3260ff11c493268c8a0553eba62512b, craton will no longer
require users to specify the project id in the headers and request body.

Change-Id: Ifb253b5d1f7a5df0e66ec15f5d1b1bf57b8a937b
Depends-On: I40d0e8b6a3260ff11c493268c8a0553eba62512b
Related-Bug: 1628845
This commit is contained in:
Ian Cordasco 2016-10-14 13:09:41 -05:00
parent e9e8ac4158
commit a12e2cc548
2 changed files with 0 additions and 24 deletions

View File

@ -58,7 +58,6 @@ class Session(object):
cratonclient.__version__)
session = ksa_session.Session(auth=self._auth,
user_agent=craton_user_agent)
self.project_id = project_id
self._session = session
def delete(self, url, **kwargs):

View File

@ -29,29 +29,6 @@ class RegionManager(crud.CRUDClient):
resource_class = Region
project_id = 0
def __init__(self, session, url):
"""Initialize our RegionManager with project, session, and url."""
super(RegionManager, self).__init__(session, url)
self.project_id = session.project_id
def create(self, **kwargs):
"""Create a region.
.. code-block:: python
>>> from cratonclient.v1 import client
>>> from cratonclient import session
>>> session = session.Session(
... username='demo',
... token='password',
... project_id=1
... )
>>> client = client.Client(session, 'http://example.com')
>>> client.regions.create(name='region')
"""
kwargs['project_id'] = self.project_id
return super(RegionManager, self).create(**kwargs)
REGION_FIELDS = {
'id': 'ID',