Exemplo n.º 1
0
 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")
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
 def setUp(self):
     config = xldeploy.Config()
     client = xldeploy.Client(config)
     self.deployfile = client.deployfile
     self.repo = client.repository
     self.clean_up_cis()
Exemplo n.º 4
0
 def setUp(self):
     config = xldeploy.Config()
     client = xldeploy.Client(config)
     self.tasks = client.tasks
     self.deployment = client.deployment
     self.repo = client.repository
Exemplo n.º 5
0
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)
Exemplo n.º 6
0
 def setUp(self):
     config = xldeploy.Config()
     client = xldeploy.Client(config)
     self.meta = client.metadata
Exemplo n.º 7
0
 def setUp(self):
     config = xldeploy.Config()
     client = xldeploy.Client(config)
     self.repo = client.repository