# Xen Orchestra Provider
The provider on top of Xen Orchestra to manage XCP-ng resources.
The releases of this package are hosted on the DESY Gitlab [here](https://gitlab.desy.de/cloud-public/pulumi-xenorchestra).
Pull Requests from dependabot are managed here and then synced back to our Gitlab.
Only Python packages are released for the provider since we cannot test it for other languages.
## Installing
If you want to use this provider in your python Code you need to install the python package
from the Gitlab pypi registry:
```
pip install pulumi-xenorchestra --index-url https://gitlab.desy.de/api/v4/projects/14393/packages/pypi/simple
```
Then you can run the following command to install the plugin (the golang binary) from the gitlab releaes page:
```
pulumi plugin install resource xenorchestra 1.2.0 --server https://gitlab.desy.de/cloud-public/pulumi-xenorchestra/-/releases/v1.2.0/downloads/
````
## Usage
in your `__main__.py` set up the Xen-Orchestra provider for pulumi in the following way:
```
import pulumi_xenorchestra as xoa
xoa_provider = xoa.Provider(
"xenorchestra",
xoa.ProviderArgs(
url=Output.secret(secret_data["xoa_url"]),
token=Output.secret(secret_data["xoa_token"]),
insecure=False,
)
```
You can then une the provider to create a Virtual Machine:
```
xoa.Vm(
resource_name=machine.name,
name_label=machine.name,
name_description="XOA VM",
cpus=4,
memory_max=8590000000,
template=template.id,
tags=["pulumi"],
cloud_config=pathlib.Path("./config/cloudinit-xen-static.yaml").read_text()
),
disks=[
xoa.VmDiskArgs(
sr_id=machine.storage_repository_id,
name_label="OS",
size=34361835520,
),
],
networks=[
xoa.VmNetworkArgs(
network_id=network.id,
mac_address=map_ip_to_mac(
machine.ipv4_address,
separator=":",
),
),
],
opts=pulumi.ResourceOptions(
provider=xoa_provider,
# Do not recreate node with new credentials
ignore_changes=["cloud_config"],
parent=self,
),
)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pulumi-xenorchestra",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "pulumi, xenorchestra, category/cloud",
"author": null,
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/7e/fa/03652ec8739482ce6d235de944a988b543ec9b29126b8994cf2069875301/pulumi_xenorchestra-1.4.0a1739797154.tar.gz",
"platform": null,
"description": "# Xen Orchestra Provider\n\nThe provider on top of Xen Orchestra to manage XCP-ng resources.\nThe releases of this package are hosted on the DESY Gitlab [here](https://gitlab.desy.de/cloud-public/pulumi-xenorchestra). \nPull Requests from dependabot are managed here and then synced back to our Gitlab.\nOnly Python packages are released for the provider since we cannot test it for other languages.\n\n## Installing \n\nIf you want to use this provider in your python Code you need to install the python package\nfrom the Gitlab pypi registry:\n```\npip install pulumi-xenorchestra --index-url https://gitlab.desy.de/api/v4/projects/14393/packages/pypi/simple\n```\nThen you can run the following command to install the plugin (the golang binary) from the gitlab releaes page:\n```\npulumi plugin install resource xenorchestra 1.2.0 --server https://gitlab.desy.de/cloud-public/pulumi-xenorchestra/-/releases/v1.2.0/downloads/\n````\n\n## Usage\n\nin your `__main__.py` set up the Xen-Orchestra provider for pulumi in the following way:\n```\nimport pulumi_xenorchestra as xoa\n\nxoa_provider = xoa.Provider(\n \"xenorchestra\",\n xoa.ProviderArgs(\n url=Output.secret(secret_data[\"xoa_url\"]),\n token=Output.secret(secret_data[\"xoa_token\"]),\n insecure=False,\n)\n```\n\nYou can then une the provider to create a Virtual Machine:\n\n```\nxoa.Vm(\n resource_name=machine.name,\n name_label=machine.name,\n name_description=\"XOA VM\",\n cpus=4,\n memory_max=8590000000,\n template=template.id,\n tags=[\"pulumi\"],\n cloud_config=pathlib.Path(\"./config/cloudinit-xen-static.yaml\").read_text()\n ),\n disks=[\n xoa.VmDiskArgs(\n sr_id=machine.storage_repository_id,\n name_label=\"OS\",\n size=34361835520,\n ),\n ],\n networks=[\n xoa.VmNetworkArgs(\n network_id=network.id,\n mac_address=map_ip_to_mac(\n machine.ipv4_address,\n separator=\":\",\n ),\n ),\n ],\n opts=pulumi.ResourceOptions(\n provider=xoa_provider,\n # Do not recreate node with new credentials\n ignore_changes=[\"cloud_config\"],\n parent=self,\n ),\n)\n```\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "A Pulumi package for creating and managing Xen Orchestra cloud resources.",
"version": "1.4.0a1739797154",
"project_urls": {
"Homepage": "https://www.pulumi.com",
"Repository": "https://github.com/vatesfr/pulumi-xenorchestra"
},
"split_keywords": [
"pulumi",
" xenorchestra",
" category/cloud"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c359b5c69cf5ddba26b6ddac1dbbbc33c54bade68fbda78e116ab20668dd63d3",
"md5": "871de6507e4d56a5abcfd18c0a3c85ed",
"sha256": "15c2a7306986ce47de539538c34c6fc33d0e4a6ba05d1a03893af693cfbfdd5e"
},
"downloads": -1,
"filename": "pulumi_xenorchestra-1.4.0a1739797154-py3-none-any.whl",
"has_sig": false,
"md5_digest": "871de6507e4d56a5abcfd18c0a3c85ed",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 87200,
"upload_time": "2025-02-17T13:08:43",
"upload_time_iso_8601": "2025-02-17T13:08:43.202623Z",
"url": "https://files.pythonhosted.org/packages/c3/59/b5c69cf5ddba26b6ddac1dbbbc33c54bade68fbda78e116ab20668dd63d3/pulumi_xenorchestra-1.4.0a1739797154-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7efa03652ec8739482ce6d235de944a988b543ec9b29126b8994cf2069875301",
"md5": "28c5fc35c1ec5def2e0e173dd8d866d0",
"sha256": "f69e75ac7de30a17a43f17a13cbe5d70a70aa1d017562ad5c879fec686f23f3f"
},
"downloads": -1,
"filename": "pulumi_xenorchestra-1.4.0a1739797154.tar.gz",
"has_sig": false,
"md5_digest": "28c5fc35c1ec5def2e0e173dd8d866d0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 47921,
"upload_time": "2025-02-17T13:08:44",
"upload_time_iso_8601": "2025-02-17T13:08:44.366736Z",
"url": "https://files.pythonhosted.org/packages/7e/fa/03652ec8739482ce6d235de944a988b543ec9b29126b8994cf2069875301/pulumi_xenorchestra-1.4.0a1739797154.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-17 13:08:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "vatesfr",
"github_project": "pulumi-xenorchestra",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pulumi-xenorchestra"
}