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

# Deployfile

## Apply Deployfile script.
deployfile = client.deployfile
deployfile.apply(open('path_to_read_deployfile_from', 'r').read())

## Generate Deployfile script.

deployfile = client.deployfile
deployfile.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.6.tar.gz (9.8 kB view details)

Uploaded Source

File details

Details for the file xldeploy-py-0.0.6.tar.gz.

File metadata

  • Download URL: xldeploy-py-0.0.6.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for xldeploy-py-0.0.6.tar.gz
Algorithm Hash digest
SHA256 bb451e88f748a9616baa5906703838fe07cb1ba98ee83c2f3991fb4de5f0cff4
MD5 de5ad62f770b1abbf69a2421a7b4ba53
BLAKE2b-256 cb2f6d8591a513568db930b4f39e484c1be2a06c8765c4edbb1a9c68e63e2be1

See more details on using hashes here.

Supported by

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