Skip to main content

The python sdk for xldeploy

Project description

Python SDK for XL-Deploy.

Usage

import xldeploy

config = xldeploy.Config(protocol="http", host="localhost", port="4516", context_path="deployit", username="admin", password="admin")

# If you are using url
config = xldeploy.Config.initialize(url="http://localhost:4516/deployit", username="admin", password="admin")

# If you are using proxies
config = xldeploy.Config(protocol="http", host="localhost", port="4516", context_path="deployit", username="admin", password="admin",  proxy_host="localhost", proxy_port=8080, proxy_username="proxyUsername", proxy_password="proxyPassword")

# or
config = xldeploy.Config()
client = xldeploy.Client(config)

# repository
repository = client.repository
print repository.exists("Applications/EC2/1.0/ec2")
print repository.exists("Applications/EC2/1.0/wrong")
ci = repository.read("Applications/EC2/1.0/ec2")
print ci.amiId

# deployment
deployment = client.deployment
deploymentRef = deployment.prepare_initial("Applications/NIApp/1.0", "Environments/awsEnv")
depl = deployment.prepare_auto_deployeds(deploymentRef)
task = deployment.create_task(depl)
task.start()
print task.task_id

# dsl

## Apply DSL script.
dsl = client.dsl
dsl.apply(open('path_to_read_dsl_from', 'r').read())

## Generate DSL script.

dsl = client.dsl
dsl.generate([Environments/directory1,Environments/directory1])

Installation

$ pip install xldeploy-py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xldeploy-py-0.0.4.tar.gz (9.8 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page