|
@@ -1,8 +1,8 @@
|
|
|
# Copyright 2016 Cloudbase Solutions Srl
|
|
# Copyright 2016 Cloudbase Solutions Srl
|
|
|
# All Rights Reserved.
|
|
# All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
+from coriolis import utils
|
|
|
from coriolis.conductor.rpc import client as rpc_client
|
|
from coriolis.conductor.rpc import client as rpc_client
|
|
|
-from coriolis.api.v1 import utils as api_utils
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class API(object):
|
|
class API(object):
|
|
@@ -27,19 +27,16 @@ class API(object):
|
|
|
def get_endpoint(self, ctxt, endpoint_id):
|
|
def get_endpoint(self, ctxt, endpoint_id):
|
|
|
return self._rpc_client.get_endpoint(ctxt, endpoint_id)
|
|
return self._rpc_client.get_endpoint(ctxt, endpoint_id)
|
|
|
|
|
|
|
|
- def get_endpoint_options(self, ctxt, endpoint_id):
|
|
|
|
|
- return self._rpc_client.get_endpoint_options(ctxt, endpoint_id)
|
|
|
|
|
-
|
|
|
|
|
def validate_connection(self, ctxt, endpoint_id):
|
|
def validate_connection(self, ctxt, endpoint_id):
|
|
|
return self._rpc_client.validate_endpoint_connection(
|
|
return self._rpc_client.validate_endpoint_connection(
|
|
|
ctxt, endpoint_id)
|
|
ctxt, endpoint_id)
|
|
|
|
|
|
|
|
- @api_utils.bad_request_on_error("Invalid destination environment: %s")
|
|
|
|
|
|
|
+ @utils.bad_request_on_error("Invalid destination environment: %s")
|
|
|
def validate_target_environment(self, ctxt, endpoint_id, target_env):
|
|
def validate_target_environment(self, ctxt, endpoint_id, target_env):
|
|
|
return self._rpc_client.validate_endpoint_target_environment(
|
|
return self._rpc_client.validate_endpoint_target_environment(
|
|
|
ctxt, endpoint_id, target_env)
|
|
ctxt, endpoint_id, target_env)
|
|
|
|
|
|
|
|
- @api_utils.bad_request_on_error("Invalid source environment: %s")
|
|
|
|
|
|
|
+ @utils.bad_request_on_error("Invalid source environment: %s")
|
|
|
def validate_source_environment(self, ctxt, endpoint_id, source_env):
|
|
def validate_source_environment(self, ctxt, endpoint_id, source_env):
|
|
|
return self._rpc_client.validate_endpoint_source_environment(
|
|
return self._rpc_client.validate_endpoint_source_environment(
|
|
|
ctxt, endpoint_id, source_env)
|
|
ctxt, endpoint_id, source_env)
|