<commit_before>knife-vcloud
===========

DESCRIPTION
--
A knife plugin for the VMWare® vCloud API.

It uses [vcloud-rest](https://github.com/astratto/vcloud-rest) to communicate with a VMWare vCloud Server.

This code is BETA QUALITY.

INSTALLATION
--
This plugin is distributed as a Ruby Gem. To install it, run:

    gem install knife-vcloud

Depending on your system's configuration, you may need to run this command with root privileges.


FEATURES
--
- login/logout
- list/show Organizations
- show VDCs
- show Catalogs
- show Catalog Items
- create/start/stop/delete vApps

PREREQUISITES
--
- chef >= 0.10.0
- knife-windows
- vcloud-rest"

USAGE
--

###Available commands

    knife vc catalog item show [ITEM_ID] (options)
    knife vc catalog show [CATALOG_ID] (options)
    knife vc login (options)
    knife vc org list (options)
    knife vc org show [ORG_ID] (options)
    knife vc vapp create [VDC_ID] [NAME] [DESCRIPTION] [TEMPLATE_ID] (options)
    knife vc vapp delete [VAPP_ID] (options)
    knife vc vapp shutdown [VAPP_ID] (options)
    knife vc vapp startup [VAPP_ID] (options)
    knife vc vdc show [VDC_ID] (options)

###Configuration
All commands accept the following options:

    --vcloud-url URL
    --vcloud-user USER
    --vcloud-password <PASSWORD>
    --vcloud-organization ORGANIZATION
    --vcloud-api-version API_VERSION

In addition, those options can be specified inside your _.chef/knife.rb_ file.

####Knife.rb configuration:

    knife[:vcloud_url] = 'https://vcloud.server.org'
    knife[:vcloud_org] = 'vcloud_organization'
    knife[:vcloud_user] = 'vcloud_user'
    knife[:vcloud_password] = '<PASSWORD>password'
    (OPTIONAL) knife[:vcloud_api_version] = '1.5'

###Login
This command can be used to verify that the vCloud Server can be reached and credentials are correct.

_Example:_

    $ knife vc login
    Authenticated successfully, code: 9NkgOPh8tH6hPmujAvc99UBSyuqm713/23mFW1f7lJ0=

###List organizations
This command lists the available organizations.

_Example:_

    $ knife vc org list
    Name                    ID
    TEST-ORG                9f3ac2a8-92dd-4921-b48b-85b42f4d247c

###Show organization's details
This command shows details about a given organization.

_Example:_

    $ knife vc org show 9f3ac2a8-92dd-4921-b48b-85b42f4d247c
    CATALOGS
    Name                    ID
    Catalog_1               7414bc46-44fc-44ed-9844-0aa6ea9f5cf9
    Catalog_2               97a1e07f-7c1a-49fe-9cda-6ccfd4658ab7

    VDCs
    Name                    ID
    Test_vDC_1              440d5134-d2dd-4be7-8692-79a28c86f55b

    NETWORKS
    Name                    ID
    TestNet_1               35e5bed1-8475-4fd9-b495-ed1f062ca9c1
    TestNet_2               d56d8035-4b9e-454e-aa75-6ff450fb432d

    TASKLISTS
    Name                    ID
    <unnamed list>          9f3ac2a8-92dd-4921-b48b-85b42f4d247c

###Show catalog's details
This command shows details about a given catalog.

_Example:_

    $ knife vc catalog show 7414bc46-44fc-44ed-9844-0aa6ea9f5cf9
    Description: Test Catalog description
    Name                    ID
    CentOS 6.3              40e5e071-8231-46c1-92b7-fbe8f633e259
    ...

###Show catalog item's details
This command shows details about a given catalog item.
e.g., retrieve a template ID

_Example:_

    $ knife vc catalog item show 40e5e071-8231-46c1-92b7-fbe8f633e259
    Description: Linux CentOS 64 bit 6 update 3
    Name                    Template ID
    CentOS 6.3              edb5bb2f-58bc-4a44-aaf6-c244543e4a1b

###Show vDC's details
This command shows details about a given vDC.

_Example:_

    $ knife vc vdc show 440d5134-d2dd-4be7-8692-79a28c86f55b
    Description:
    vAPPS
    Name                    ID                                    Status    IP
    TestKnife (1 VMs)       09551b42-dca9-474d-aa50-201b223522db  running   10.102.46.237
    TestCENTOS (1 VMs)      4338a436-19fc-47b9-aaba-024841acfd66  stopped   10.102.46.23

###Startup vApp
This command starts up a given vApp.

_Example:_

    $ knife vc vapp startup 4338a436-19fc-47b9-aaba-024841acfd66
    vApp startup...Done!
    Summary: Status: success - started at 2012-12-19T16:50:31.030+01:00 and ended at 2012-12-19T16:50:38.487+01:00

###Shutdown vApp
This command halts a given vApp.

_Example:_

    $ knife vc vapp $ knife vc vapp shutdown 09551b42-dca9-474d-aa50-201b223522db
    vApp shutdown...Done!
    Summary: Status: success - started at 2012-12-19T16:56:31.100+01:00 and ended at 2012-12-19T16:56:38.667+01:00

###Delete vApp
This command deletes a given vApp.

_Example:_

    $ knife vc vapp delete c1bad644-6c4d-40fc-a46b-7624ff6d5e75
    Do you really want to DELETE vApp c1bad644-6c4d-40fc-a46b-7624ff6d5e75?? (Y/N) Y
    vApp deletion...Done!
    Summary: Status: success - started at 2012-12-19T17:00:20.503+01:00 and ended at 2012-12-19T17:00:21.133+01:00

###Create vApp from template
This command creates a vApp starting from a template (see catalog item).

_Example:_

    $ knife vc vapp create 440d5134-d2dd-4be7-8692-79a28c86f55b TestVM "Test vm description" 14b63ef2-fe93-4d0b-91f0-ccbd3847c665
    vApp creation...Done!<commit_msg>Fix documentation related to vApp start/stop<commit_after>knife-vcloud
===========

DESCRIPTION
--
A knife plugin for the VMWare® vCloud API.

It uses [vcloud-rest](https://github.com/astratto/vcloud-rest) to communicate with a VMWare vCloud Server.

This code is BETA QUALITY.

INSTALLATION
--
This plugin is distributed as a Ruby Gem. To install it, run:

    gem install knife-vcloud

Depending on your system's configuration, you may need to run this command with root privileges.


FEATURES
--
- login/logout
- list/show Organizations
- show VDCs
- show Catalogs
- show Catalog Items
- create/start/stop/delete vApps

PREREQUISITES
--
- chef >= 0.10.0
- knife-windows
- vcloud-rest"

USAGE
--

###Available commands

    knife vc catalog item show [ITEM_ID] (options)
    knife vc catalog show [CATALOG_ID] (options)
    knife vc login (options)
    knife vc org list (options)
    knife vc org show [ORG_ID] (options)
    knife vc vapp create [VDC_ID] [NAME] [DESCRIPTION] [TEMPLATE_ID] (options)
    knife vc vapp delete [VAPP_ID] (options)
    knife vc vapp start [VAPP_ID] (options)
    knife vc vapp stop [VAPP_ID] (options)
    knife vc vdc show [VDC_ID] (options)

###Configuration
All commands accept the following options:

    --vcloud-url URL
    --vcloud-user USER
    --vcloud-password <PASSWORD>
    --vcloud-organization ORGANIZATION
    --vcloud-api-version API_VERSION

In addition, those options can be specified inside your _.chef/knife.rb_ file.

####Knife.rb configuration:

    knife[:vcloud_url] = 'https://vcloud.server.org'
    knife[:vcloud_org] = 'vcloud_organization'
    knife[:vcloud_user] = 'vcloud_user'
    knife[:vcloud_password] = 'vcloud_password'
    (OPTIONAL) knife[:vcloud_api_version] = '1.5'

###Login
This command can be used to verify that the vCloud Server can be reached and credentials are correct.

_Example:_

    $ knife vc login
    Authenticated successfully, code: 9NkgOPh8tH6hPmujAvc99UBSyuqm713/23mFW1f7lJ0=

###List organizations
This command lists the available organizations.

_Example:_

    $ knife vc org list
    Name                    ID
    TEST-ORG                9f3ac2a8-92dd-4921-b48b-85b42f4d247c

###Show organization's details
This command shows details about a given organization.

_Example:_

    $ knife vc org show 9f3ac2a8-92dd-4921-b48b-85b42f4d247c
    CATALOGS
    Name                    ID
    Catalog_1               7414bc46-44fc-44ed-9844-0aa6ea9f5cf9
    Catalog_2               97a1e07f-7c1a-49fe-9cda-6ccfd4658ab7

    VDCs
    Name                    ID
    Test_vDC_1              440d5134-d2dd-4be7-8692-79a28c86f55b

    NETWORKS
    Name                    ID
    TestNet_1               35e5bed1-8475-4fd9-b495-ed1f062ca9c1
    TestNet_2               d56d8035-4b9e-454e-aa75-6ff450fb432d

    TASKLISTS
    Name                    ID
    <unnamed list>          9f3ac2a8-92dd-4921-b48b-85b42f4d247c

###Show catalog's details
This command shows details about a given catalog.

_Example:_

    $ knife vc catalog show 7414bc46-44fc-44ed-9844-0aa6ea9f5cf9
    Description: Test Catalog description
    Name                    ID
    CentOS 6.3              40e5e071-8231-46c1-92b7-fbe8f633e259
    ...

###Show catalog item's details
This command shows details about a given catalog item.
e.g., retrieve a template ID

_Example:_

    $ knife vc catalog item show 40e5e071-8231-46c1-92b7-fbe8f633e259
    Description: Linux CentOS 64 bit 6 update 3
    Name                    Template ID
    CentOS 6.3              edb5bb2f-58bc-4a44-aaf6-c244543e4a1b

###Show vDC's details
This command shows details about a given vDC.

_Example:_

    $ knife vc vdc show 440d5134-d2dd-4be7-8692-79a28c86f55b
    Description:
    vAPPS
    Name                    ID                                    Status    IP
    TestKnife (1 VMs)       09551b42-dca9-474d-aa50-201b223522db  running   10.102.46.237
    TestCENTOS (1 VMs)      4338a436-19fc-47b9-aaba-024841acfd66  stopped   10.102.46.23

###Startup vApp
This command starts up a given vApp.

_Example:_

    $ knife vc vapp start 4338a436-19fc-47b9-aaba-024841acfd66
    vApp startup...Done!
    Summary: Status: success - started at 2012-12-19T16:50:31.030+01:00 and ended at 2012-12-19T16:50:38.487+01:00

###Shutdown vApp
This command halts a given vApp.

_Example:_

    $ knife vc vapp $ knife vc vapp stop 09551b42-dca9-474d-aa50-201b223522db
    vApp shutdown...Done!
    Summary: Status: success - started at 2012-12-19T16:56:31.100+01:00 and ended at 2012-12-19T16:56:38.667+01:00

###Delete vApp
This command deletes a given vApp.

_Example:_

    $ knife vc vapp delete c1bad644-6c4d-40fc-a46b-7624ff6d5e75
    Do you really want to DELETE vApp c1bad644-6c4d-40fc-a46b-7624ff6d5e75?? (Y/N) Y
    vApp deletion...Done!
    Summary: Status: success - started at 2012-12-19T17:00:20.503+01:00 and ended at 2012-12-19T17:00:21.133+01:00

###Create vApp from template
This command creates a vApp starting from a template (see catalog item).

_Example:_

    $ knife vc vapp create 440d5134-d2dd-4be7-8692-79a28c86f55b TestVM "Test vm description" 14b63ef2-fe93-4d0b-91f0-ccbd3847c665
    vApp creation...Done!
{'fraction_non_alphanumeric': 0.08533980582524271, 'fraction_numerical': 0.11631067961165048, 'mean_word_length': 2.7228044813877847, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 10, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2691699', 'n_tokens_mistral': 4419, 'n_tokens_neox': 3754, 'n_words': 976}