CLI Command Specs - cloud-barista/cb-spider GitHub Wiki

Usage:

             $ spctl [global flag] resource [resource flag] command [command flag]

    global flags:

  -c, --config string  config file (default "./spctl.conf")
  -h, --help               help for spctl
  -i, --input string     input format (json/yaml) (default "yaml")
  -o, --output string  output format (json/yaml) (default "yaml")

    resource flags:

    -h, --help                help for resource

    command flags: create

    -h, --help                help for command
    -d, --indata string   input string data
    -f, --infile string      input file path

    command flags: list

         --cname string   connection name
    -h, --help                 help for command

command flags: get

         --cname string  connection name
    -h, --help                help for command
    -n, --name string    resource name

    command flags: delete

         --cname string  connection name
         --force string     force flag (true/false) (default "false")
    -h, --help                help for command
    -n, --name string    resource name

    Resources and Commands:

Resource Command
 version
[resource]  help
os list
image list / get
vmspec list / get
driver create / list / get / delete
credential create / list / get / delete
region create / list / get / delete
connection create / list / get / delete
vpc create / list / listall / get / delete / deletecsp / add-subnet / remove-subnet / removecsp-subnet
security create / list / listall / get / delete / deletecsp
keypair create / list / listall / get / delete / deletecsp
vm start / list / listall / liststatus / get / getstatus / terminate / terminatecsp

Examples: help

$ spctl vpc help

This is a manageable command for vpc

Usage:
  spider vpc [command]

Available Commands:
  add-subnet       This is add command for vpc subnet
  create           This is create command for vpc
  delete           This is delete command for vpc
  deletecsp        This is delete csp command for vpc
  get              This is get command for vpc
  list             This is list command for vpc
  listall          This is list all command for vpc
  remove-subnet    This is remove command for vpc subnet
  removecsp-subnet This is remove csp command for vpc subnet

Flags:
  -h, --help   help for vpc

Global Flags:
  -c, --config string   config file (default "./spctl.conf")
  -i, --input string    input format (json/yaml) (default "yaml")
  -o, --output string   output format (json/yaml) (default "yaml")

Examples: Create

$ spctl vpc create -i json -d \
    '{
      "ConnectionName":"aws-ohio-config",
      "ReqInfo": {
        "Name": "sp-vpc-1",
        "IPv4_CIDR": "192.168.0.0/16",
        "SubnetInfoList": [
          {
            "Name": "sp-subnet-1",
            "IPv4_CIDR": "192.168.1.0/24"
          }
        ]
      }
    }'
IId:
  NameId: sp-vpc-1
  SystemId: vpc-023d97bad7a337359
IPv4_CIDR: 192.168.0.0/16
SubnetInfoList:
- IId:
    NameId: sp-subnet-1
    SystemId: subnet-05759dc1f7d2ce245
  IPv4_CIDR: 192.168.1.0/24
  KeyValueList:
  - Key: VpcId
    Value: vpc-023d97bad7a337359
  - Key: MapPublicIpOnLaunch
    Value: "false"
  - Key: AvailableIpAddressCount
    Value: "251"
  - Key: AvailabilityZone
    Value: us-east-2a
  - Key: Status
    Value: available
KeyValueList: null

Examples: list

$ spctl vpc list --cname aws-ohio-config

vpc:
- IId:
    NameId: sp-vpc-1
    SystemId: vpc-02b24d29e0c903ffd
  IPv4_CIDR: 192.168.0.0/16
  SubnetInfoList:
  - IId:
      NameId: sp-subnet-1
      SystemId: subnet-0c3e63ee6b62bf510
    IPv4_CIDR: 192.168.1.0/24
    KeyValueList:
    - Key: VpcId
      Value: vpc-02b24d29e0c903ffd
    - Key: MapPublicIpOnLaunch
      Value: "false"
    - Key: AvailableIpAddressCount
      Value: "251"
    - Key: AvailabilityZone
      Value: us-east-2a
    - Key: Status
      Value: available
  KeyValueList: null

Examples: get

$ spctl vpc get --cname aws-ohio-config -n sp-vpc-1

IId:
  NameId: sp-vpc-1
  SystemId: vpc-02b24d29e0c903ffd
IPv4_CIDR: 192.168.0.0/16
SubnetInfoList:
- IId:
    NameId: sp-subnet-1
    SystemId: subnet-0c3e63ee6b62bf510
  IPv4_CIDR: 192.168.1.0/24
  KeyValueList:
  - Key: VpcId
    Value: vpc-02b24d29e0c903ffd
  - Key: MapPublicIpOnLaunch
    Value: "false"
  - Key: AvailableIpAddressCount
    Value: "251"
  - Key: AvailabilityZone
    Value: us-east-2a
  - Key: Status
    Value: available
KeyValueList: null

Examples: delete

$ spctl vpc delete --cname aws-ohio-config -n sp-vpc-1

Result: true