Add or overwrite a new credential to the database
Usage: vp-add-credential [options]
Options:
-h, --help show this help message and exit
--cred-name=CRED_NAME
Name of the credential
--desc=CRED_DESC Description of the credential
--ctype=CTYPE Cluster type this cert is for (ec2, nimbus, diag,
local)
-c CERT, --cert=CERT Path to cert
-p PKEY, --pkey=PKEY path to private key
-d DEVEL, --devel=DEVEL
Path to devel1.pem
-m METADATA Add metadata in a key=value notation. Multiple
options are valid. Ex: -m ec2_url=http://foo/bar/zoom
-m comment="This works"
Add an ec2 credential named foo:
vp-add-credential --cred-name=foo --ctype=ec2 -c /path/to/cert.pem -p /path/to/pkey.pem
Output
None
/vappio/credential_ws.py
Paramater | Required | Type | Meaning |
---|---|---|---|
credential_name | Yes | String | The credential name. |
description | Yes | String | A description of the credential. |
ctype | Yes | String | The credential type (diag, nimbus, ec2, local, etc). |
cert | Yes | String | The contents of the certificate file. |
pkey | Yes | String | The contents of the private key file. |
metadata | Yes | Dictionary | Key value pairs for metadata used in the credential. |
None
Get a list of the available credentials as well as the number of running instances associated with that credential.
Usage: vp-describe-credentials [options]
Options:
-h, --help show this help message and exit
--host=HOST Host of webservice to contact
--name=NAME Name of cluster
--cred-name=CRED_NAME
Name of credential, all credentials are listed if not
provided
List all credentials and the number of instances under each:
vp-describe-credentials
Output:
CRED local 0
CRED diag 0
/vappio/credential_ws.py
Parameter | Required | Type | Meaning |
---|---|---|---|
credential_names | No | List of Strings | This list limits the returned credentials to just those in the list. |
A list of dictionaries is returned where each dictionary contains the following keys:
Parameter | Type | Meaning |
---|---|---|
name | String | The name of the credential. |
description | String | The description of the credential. |
num_instances | Int | The number of active instances running on that credential. |