def should_throw_xldeploy_exception_test(self): invalid_config = xldeploy.Config(protocol="http", host="localhost", port="4516", context_path="deployit", username="******", password="******") new_client = xldeploy.Client(invalid_config) self.assertRaises(XLDeployException, new_client.deployment.prepare_initial, "dummy-package", "dummy-env")
def __init__(self, url=None, username=None, password=None, debug=False): if self.__is_config_required(argv[0:]): self.__url = self.__get_arg_value(url, XldArgsValidator.XL_DEPLOY_URL) self.__username = self.__get_arg_value( username, XldArgsValidator.XL_DEPLOY_USERNAME) self.__password = self.__get_arg_value( password, XldArgsValidator.XL_DEPLOY_PASSWORD) self.__debug = debug XldArgsValidator().validate(self.__url, self.__username, self.__password) config = xldeploy.Config.initialize(url=self.__url + '/deployit', username=self.__username, password=self.__password) self.__client = xldeploy.Client(config)
def setUp(self): config = xldeploy.Config() client = xldeploy.Client(config) self.deployfile = client.deployfile self.repo = client.repository self.clean_up_cis()
def setUp(self): config = xldeploy.Config() client = xldeploy.Client(config) self.tasks = client.tasks self.deployment = client.deployment self.repo = client.repository
import xldeploy config = xldeploy.Config(protocol="http", host="localhost", port="4516", context_path="deployit", username="******", password="******") client = xldeploy.Client(config) # repository repository = client.repository print(repository.exists("Applications/windows-webform/1.1")) print(repository.exists("Applications/kitchensink")) ci = repository.read("Applications/petstore/1.0") print(ci.id) # deployment deployment = client.deployment print(dir(deployment)) try: undepl = deployment.prepare_undeploy("Environments/PRD/windows-webform") untask = deployment.create_task(undepl) untask.start() except Exception as ex : print(ex) deploymentRef = deployment.prepare_initial("Applications/windows-webform/1.1", "Environments/PRD") depl = deployment.prepare_auto_deployeds(deploymentRef) task = deployment.create_task(depl) task.start() print(dir(task)) print(dir(task.task_service)) print(dir(task.get_steps("0_1_1"))) print(dir(deployment)) # deployment.waitForTask(task.id)
def setUp(self): config = xldeploy.Config() client = xldeploy.Client(config) self.meta = client.metadata
def setUp(self): config = xldeploy.Config() client = xldeploy.Client(config) self.repo = client.repository