Merge "modify 'v1' in the comment to 'v2'"
This commit is contained in:
commit
29ccde06a3
@ -27,7 +27,7 @@ FREEZER_SERVICE_TYPE = 'backup'
|
||||
|
||||
|
||||
class Client(object):
|
||||
"""Client for the OpenStack Disaster Recovery v1 API.
|
||||
"""Client for the OpenStack Disaster Recovery v2 API.
|
||||
"""
|
||||
|
||||
def __init__(self, token=None, username=None, password=None,
|
||||
@ -37,7 +37,7 @@ class Client(object):
|
||||
project_domain_name=None, project_domain_id=None,
|
||||
cert=None, cacert=None, insecure=False, project_id=None):
|
||||
"""
|
||||
Initialize a new client for the Disaster Recovery v1 API.
|
||||
Initialize a new client for the Disaster Recovery v2 API.
|
||||
:param token: keystone token
|
||||
:param username: openstack username
|
||||
:param password: openstack password
|
||||
|
@ -96,7 +96,7 @@ class JobManager(object):
|
||||
result: string 'success' or 'already started'
|
||||
}
|
||||
"""
|
||||
# endpoint /v1/jobs/{job_id}/event
|
||||
# endpoint /v2/jobs/{job_id}/event
|
||||
endpoint = '{0}{1}/event'.format(self.endpoint, job_id)
|
||||
doc = {"start": None}
|
||||
r = requests.post(endpoint,
|
||||
@ -117,7 +117,7 @@ class JobManager(object):
|
||||
result: string 'success' or 'already stopped'
|
||||
}
|
||||
"""
|
||||
# endpoint /v1/jobs/{job_id}/event
|
||||
# endpoint /v2/jobs/{job_id}/event
|
||||
endpoint = '{0}{1}/event'.format(self.endpoint, job_id)
|
||||
doc = {"stop": None}
|
||||
r = requests.post(endpoint,
|
||||
@ -138,7 +138,7 @@ class JobManager(object):
|
||||
result: string 'success' or 'already stopped'
|
||||
}
|
||||
"""
|
||||
# endpoint /v1/jobs/{job_id}/event
|
||||
# endpoint /v2/jobs/{job_id}/event
|
||||
endpoint = '{0}{1}/event'.format(self.endpoint, job_id)
|
||||
doc = {"abort": None}
|
||||
r = requests.post(endpoint,
|
||||
|
@ -84,7 +84,7 @@ class SessionManager(object):
|
||||
return r.json()['version']
|
||||
|
||||
def add_job(self, session_id, job_id):
|
||||
# endpoint /v1/sessions/{sessions_id}/jobs/{job_id}
|
||||
# endpoint /v2/sessions/{sessions_id}/jobs/{job_id}
|
||||
endpoint = '{0}{1}/jobs/{2}'.format(self.endpoint, session_id, job_id)
|
||||
r = requests.put(endpoint,
|
||||
headers=self.headers, verify=self.verify)
|
||||
@ -93,7 +93,7 @@ class SessionManager(object):
|
||||
return
|
||||
|
||||
def remove_job(self, session_id, job_id):
|
||||
# endpoint /v1/sessions/{sessions_id}/jobs/{job_id}
|
||||
# endpoint /v2/sessions/{sessions_id}/jobs/{job_id}
|
||||
endpoint = '{0}{1}/jobs/{2}'.format(self.endpoint, session_id, job_id)
|
||||
retry = 5
|
||||
r = ''
|
||||
@ -122,7 +122,7 @@ class SessionManager(object):
|
||||
{ result: string 'running' or 'error',
|
||||
'session_tag': the new session_tag )
|
||||
"""
|
||||
# endpoint /v1/sessions/{sessions_id}/action
|
||||
# endpoint /v2/sessions/{sessions_id}/action
|
||||
endpoint = '{0}{1}/action'.format(self.endpoint, session_id)
|
||||
doc = {"start": {
|
||||
"job_id": job_id,
|
||||
@ -147,7 +147,7 @@ class SessionManager(object):
|
||||
:param result:
|
||||
:return:
|
||||
"""
|
||||
# endpoint /v1/sessions/{sessions_id}/action
|
||||
# endpoint /v2/sessions/{sessions_id}/action
|
||||
endpoint = '{0}{1}/action'.format(self.endpoint, session_id)
|
||||
doc = {"end": {
|
||||
"job_id": job_id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user