diff --git a/source/advanced_components/ddc/template/virtual.rst b/source/advanced_components/ddc/template/virtual.rst index 9498d8e384..b29c80b71e 100644 --- a/source/advanced_components/ddc/template/virtual.rst +++ b/source/advanced_components/ddc/template/virtual.rst @@ -71,7 +71,7 @@ We are going to deploy a cluster with the following elements: marketplaceapps: - appname: "Ttylinux - KVM" name: "TTY" - dsid: <%= @datastores[0]['ID'] %> + dsid: <%= @body['provision']['infrastructure']['datastores'][0]['id'] %> meta: wait: true wait_timeout: 30 @@ -95,7 +95,7 @@ This will deploy the host in Packet, will configure it and will create all the o marketplaceapps: - appname: "Ttylinux - KVM" name: "TTY" - dsid: <%= @datastores[0]['ID'] %> + dsid: <%= @body['provision']['infrastructure']['datastores'][0]['id'] %> meta: wait: true wait_timeout: 30 @@ -107,31 +107,30 @@ The final result would be the following: .. prompt:: bash $ auto - $ oneprovision show 24959b5c-8eca-4cd8-a3bb-dac36a7b5c1d -x - - 24959b5c-8eca-4cd8-a3bb-dac36a7b5c1d - packet_cluster - pending - - 100 - - - 101 - 100 - - - 0 - - - 0 - - - 0 - - - 0 - - + $ oneprovision show 18 -x + + 18 + 0 + 0 + oneadmin + oneadmin + testing + 103 + + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + As you can see all the objects have been created and they belong to the same provision. This means, that when you for example delete the provision all the objects are going to be deleted as once. @@ -382,11 +381,11 @@ For this, ERB expressions are available, so you can reference objects that have images: - name: "test_image" - ds_id: <%= @datastores[0]['ID'] %> + ds_id: <%= @body['provision']['infrastructure']['datastores'][0]['id'] %> size: 2048 In this example, we create two datastores (system and images) and an image. We want to store the image in the image datastore we just created, so we can -reference it using the ERB expression ``@datastores[0]['ID']``. +reference it using the ERB expression ``@body['provision']['infrastructure']['datastores'][0]['id']``. .. code:: @@ -400,10 +399,10 @@ reference it using the ERB expression ``@datastores[0]['ID']``. memory: 1 cpu: 1 disk: - - image_id: <%= @images[0]['ID'] %> + - image_id: <%= @body['provision']['resource']['images'][0]['id'] %> In this example, we create an image and a template. We want the template to have a disk referencing to the new image, so we can reference it using -the ERB expression ``<%= @images[0]['ID'] %>``. +the ERB expression ``@body['provision']['resource']['images'][0]['id']``. .. warning:: The order of objects creation is the following: @@ -482,7 +481,7 @@ Here you can check a full provision template example: images: - name: "test_image" - ds_id: <%= @datastores[0]['ID'] %> + ds_id: <%= @body['provision']['infrastructure']['datastores'][0]['id'] %> size: 2048 meta: uid: 1 @@ -492,7 +491,7 @@ Here you can check a full provision template example: marketplaceapps: - appid: 238 name: "test_image2" - dsid: <%= @datastores[0]['ID'] %> + dsid: <%= @body['provision']['infrastructure']['datastores'][0]['id'] %> meta: uid: 1 gid: 100 @@ -504,9 +503,9 @@ Here you can check a full provision template example: memory: 1 cpu: 1 disk: - - image_id: <%= @images[1]['ID'] %> + - image_id: <%= @body['provision']['resource']['images'][1]['id'] %> nic: - - network_id: <%= @networks[0]['ID'] %> + - network_id: <%= @body['provision']['infrastructure']['networks'][0]['id'] %> meta: uid: 1 gid: 100 @@ -519,14 +518,14 @@ Here you can check a full provision template example: - ip: "10.0.0.1" size: 10 type: "IP4" - cluster_ids: <%= @clusters[0]['ID'] %> + cluster_ids: <%= @body['provision']['infrastructure']['clusters'][0]['id'] %> flowtemplates: - name: "my_service" deployment: "straight" roles: - name: "frontend" - vm_template: <%= @templates[0]['ID'] %> + vm_template: <%= @body['provision']['resource']['templates'][0]['id'] %> meta: uid: 1 gid: 100 diff --git a/source/advanced_components/ddc/usage.rst b/source/advanced_components/ddc/usage.rst index 73866a74c9..c3e14c0ea0 100644 --- a/source/advanced_components/ddc/usage.rst +++ b/source/advanced_components/ddc/usage.rst @@ -95,11 +95,23 @@ List The ``list`` command lists all provisions. +Parameters: + ++------------------+-------------------------------+-----------+ +| Parameter | Description | Mandatory | ++==================+===============================+===========+ +| ``--csv`` | Show output as CSV | NO | ++------------------+-------------------------------+-----------+ +| ``--json`` | Show output as JSON | NO | ++------------------+-------------------------------+-----------+ +| ``--done`` | Show provisions in DONE state | NO | ++------------------+-------------------------------+-----------+ + .. prompt:: bash $ auto $ oneprovision list - ID NAME CLUSTERS HOSTS VNETS DATASTORES STAT - 8fc831e6-9066-4c57-9ee4-4b11fea98f00 myprovision 1 1 1 2 configured + ID NAME CLUSTERS HOSTS VNETS DATASTORES STAT + 18 myprovision 1 1 1 2 RUNNING Show ---- @@ -115,29 +127,49 @@ Parameters: +------------------+---------------------+-----------+ | ``--csv`` | Show output as CSV | NO | +------------------+---------------------+-----------+ +| ``--json`` | Show output as JSON | NO | ++------------------+---------------------+-----------+ +| ``--xml`` | Show output as XML | NO | ++------------------+---------------------+-----------+ Examples: .. prompt:: bash $ auto - $ oneprovision show 8fc831e6-9066-4c57-9ee4-4b11fea98f00 - PROVISION INFORMATION - ID : 8fc831e6-9066-4c57-9ee4-4b11fea98f00 - NAME : myprovision - STATUS : configured + $ oneprovision show 18 + PROVISION 18 INFORMATION + ID : 18 + NAME : testing + STATE : RUNNING + + Provision Infrastructure Resources CLUSTERS - 184 + 114: tf + + DATASTORES + 128: tf-images + 129: tf-system HOSTS - 766 + 18: provision-cbbe1e477a1bd5e1324ae66bdffc20e28ae0b0b93f10db43 - VNETS - 135 + NETWORKS + 14: tf-hostonly_nat - DATASTORES - 318 - 319 + Provision Resource Resources + + FLOWTEMPLATES + 19: my_service + + IMAGES + 18: test_image + + TEMPLATES + 15: test_template + + VNTEMPLATES + 11: vntemplate Configure --------- @@ -400,6 +432,103 @@ The ``oneprovision vnet delete`` command deletes the virtual network. 2018-11-27 13:02:08 INFO : Deleting vnet 136 VNET 136: deleted +Images +------ + +Individual images from the provision can be managed by the ``oneprovision image`` subcommands. + +Image List +^^^^^^^^^^ + +The ``oneprovision image list`` command lists all images. + +.. prompt:: bash $ auto + + $ oneprovision image list + ID USER GROUP NAME DATASTORE SIZE TYPE PER STAT RVMS + 0 serverad users test_image tf-images 2G OS No rdy 0 + +Image Delete +^^^^^^^^^^^^ + +The ``oneprovision image delete`` command deletes the image. + +.. prompt:: bash $ auto + + $ oneprovision image delete 0 -d + 2018-11-27 13:02:08 INFO : Deleting image 0 + IMAGE 0: deleted + +Templates +--------- + +Individual VM templates from the provision can be managed by the ``oneprovision template`` subcommands. + +Template List +^^^^^^^^^^^^^ + +The ``oneprovision template list`` command lists all templates. + +.. prompt:: bash $ auto + + $ oneprovision template list + ID USER GROUP NAME REGTIME + 0 oneadmin oneadmin test_template 09/21 14:17:28 + +Template Delete +^^^^^^^^^^^^^^^ + +The ``oneprovision template delete`` command deletes the template. + +.. prompt:: bash $ auto + + $ oneprovision template delete 0 -d + 2018-11-27 13:02:08 INFO : Deleting template 0 + TEMPLATE 0: deleted + +VNet Templates +-------------- + +Individual VNet templates from the provision can be managed by the ``oneprovision vntemplate`` subcommands. + +VNet Template List +^^^^^^^^^^^^^^^^^^ + +The ``oneprovision vntemplate list`` command lists all VNet templates. + +.. prompt:: bash $ auto + + $ oneprovision vntemplate list + ID USER GROUP NAME REGTIME + 0 oneadmin oneadmin vntemplate 09/21 14:17:28 + +VNet Template Delete +^^^^^^^^^^^^^^^^^^^^ + +The ``oneprovision vntemplate delete`` command deletes the VNet template. + +.. prompt:: bash $ auto + + $ oneprovision vntemplate delete 0 -d + 2018-11-27 13:02:08 INFO : Deleting vntemplate 0 + VNTEMPLATE 0: deleted + +Flow Templates +-------------- + +Individual Flow templates from the provision can be managed by the ``oneprovision flowtemplate`` subcommands. + +Flow Template Delete +^^^^^^^^^^^^^^^^^^^^ + +The ``oneprovision flowtemplate delete`` command deletes the Flow template. + +.. prompt:: bash $ auto + + $ oneprovision flowtemplate delete 0 -d + 2018-11-27 13:02:08 INFO : Deleting flowtemplate 0 + FLOWTEMPLATE 0: deleted + .. _ddc_usage_log: Logging Modes diff --git a/source/integration/infrastructure_integration/devel-pm.rst b/source/integration/infrastructure_integration/devel-pm.rst index 41be74135e..89217cb6db 100644 --- a/source/integration/infrastructure_integration/devel-pm.rst +++ b/source/integration/infrastructure_integration/devel-pm.rst @@ -110,11 +110,9 @@ Example: provision-c968cbcf40716f8e18caddbb8757c2ca7ed0942a357d511b kvm kvm - packet