3.74. Hammer 子网
操作子网
Usage: hammer subnet [OPTIONS] SUBCOMMAND [ARG] ... Parameters: SUBCOMMAND Subcommand [ARG] ... Subcommand arguments Subcommands: create Create a subnet delete, destroy Delete a subnet delete-parameter Delete parameter for a subnet info, show Show a subnet list, index List of subnets set-parameter Create or update parameter for a subnet update Update a subnet Options: -h, --help Print help
3.74.1. hammer 子网创建
创建子网
Usage: hammer subnet create [OPTIONS] Options: --bmc VALUE BMC Proxy to use within this subnet --bmc-id NUMBER BMC Capsule ID to use within this subnet --boot-mode ENUM Default boot mode for interfaces assigned to this subnet. Possible value(s): 'Static', 'DHCP' --description VALUE Subnet description --dhcp VALUE DHCP Proxy to use within this subnet --dhcp-id NUMBER DHCP Capsule ID to use within this subnet --discovery-id NUMBER ID of Discovery Capsule to use within this subnet for managing connection to discovered hosts --dns VALUE DNS Proxy to use within this subnet --dns-id NUMBER DNS Capsule ID to use within this subnet --dns-primary VALUE Primary DNS for this subnet --dns-secondary VALUE Secondary DNS for this subnet --domain-ids LIST Domains in which this subnet is part --domains LIST --externalipam-group VALUE External IPAM group - only relevant when IPAM is set to external --externalipam-id NUMBER External IPAM Capsule ID to use within this subnet --from VALUE Starting IP Address for IP auto suggestion --gateway VALUE Subnet gateway --httpboot-id NUMBER HTTPBoot Capsule ID to use within this subnet --ipam ENUM IP Address auto suggestion mode for this subnet. Possible value(s): 'DHCP', 'Internal DB', 'Random DB', 'EUI-64', 'External IPAM', 'None' --location VALUE Set the current location context for the request --location-id NUMBER Set the current location context for the request --location-ids LIST REPLACE locations with given ids --location-title VALUE Set the current location context for the request --location-titles LIST --locations LIST --mask VALUE Netmask for this subnet --mtu NUMBER MTU for this subnet --name VALUE Subnet name --network VALUE Subnet network --network-type ENUM Type or protocol, IPv4 or IPv6, defaults to IPv4 Possible value(s): 'IPv4', 'IPv6' --organization VALUE Set the current organization context for the request --organization-id NUMBER Set the current organization context for the request --organization-ids LIST REPLACE organizations with given ids. --organization-title VALUE Set the current organization context for the request --organization-titles LIST --organizations LIST --prefix VALUE Network prefix in CIDR notation (e.g. 64) for this subnet --remote-execution-proxy-ids LIST List of Capsule IDs to be used for remote execution --template-id NUMBER Template HTTP(S) Capsule ID to use within this subnet --tftp VALUE TFTP Proxy to use within this subnet --tftp-id NUMBER TFTP Capsule ID to use within this subnet --to VALUE Ending IP Address for IP auto suggestion --vlanid VALUE VLAN ID for this subnet -h, --help Print help Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.74.2. Hammer 子网删除
删除子网
Usage: hammer subnet <delete|destroy> [OPTIONS] Options: --id NUMBER Subnet numeric identifier --location VALUE Set the current location context for the request --location-id NUMBER Set the current location context for the request --location-title VALUE Set the current location context for the request --name VALUE Subnet name --organization VALUE Set the current organization context for the request --organization-id NUMBER Set the current organization context for the request --organization-title VALUE Set the current organization context for the request -h, --help Print help Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.74.3. hammer subnet delete-parameter
子网的删除参数
Usage: hammer subnet delete-parameter [OPTIONS] Options: --name VALUE Parameter name --subnet VALUE Subnet name --subnet-id NUMBER -h, --help Print help Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.74.4. Hammer 子网信息
显示子网
Usage: hammer subnet <info|show> [OPTIONS] Options: --fields LIST Show specified fields or predefined field sets only. (See below) --id VALUE --location VALUE Set the current location context for the request --location-id NUMBER Set the current location context for the request --location-title VALUE Set the current location context for the request --name VALUE Subnet name --organization VALUE Set the current organization context for the request --organization-id NUMBER Set the current organization context for the request --organization-title VALUE Set the current organization context for the request --show-hidden-parameters BOOLEAN Display hidden parameter values -h, --help Print help Predefined field sets: ------------------------------|-----|---------|----- FIELDS | ALL | DEFAULT | THIN ------------------------------|-----|---------|----- Id | x | x | x Name | x | x | x Description | x | x | Protocol | x | x | Priority | x | x | Network addr | x | x | Network prefix | x | x | Network mask | x | x | Gateway addr | x | x | Primary dns | x | x | Secondary dns | x | x | Smart proxies/dns | x | x | Smart proxies/tftp | x | x | Smart proxies/dhcp | x | x | Remote execution proxies/id | x | x | Remote execution proxies/name | x | x | Ipam | x | x | Start of ip range | x | x | End of ip range | x | x | Vlan id | x | x | Mtu | x | x | Boot mode | x | x | Domains/ | x | x | Locations/ | x | x | Organizations/ | x | x | Parameters/ | x | x | ------------------------------|-----|---------|----- Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.74.5. Hammer 子网列表
子网列表
Usage: hammer subnet <list|index> [OPTIONS] Options: --domain VALUE Domain name --domain-id VALUE ID of domain --fields LIST Show specified fields or predefined field sets only. (See below) --location VALUE Set the current location context for the request --location-id NUMBER Scope by locations --location-title VALUE Set the current location context for the request --order VALUE Sort and order by a searchable field, e.g. '<field> DESC' --organization VALUE Set the current organization context for the request --organization-id NUMBER Scope by organizations --organization-title VALUE Set the current organization context for the request --page NUMBER Page number, starting at 1 --per-page VALUE Number of results per page to return, 'all' to return all results --search VALUE Filter results -h, --help Print help Predefined field sets: ----------------|-----|---------|----- FIELDS | ALL | DEFAULT | THIN ----------------|-----|---------|----- Id | x | x | x Name | x | x | x Network addr | x | x | Network prefix | x | x | Network mask | x | x | Vlan id | x | x | Boot mode | x | x | Gateway address | x | x | ----------------|-----|---------|----- Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string Search / Order fields: boot_mode string dns_primary string dns_secondary string domain string gateway string ipam string location string location_id integer mask string mtu integer name text network string nic_delay integer organization string organization_id integer params string type string vlanid integer
3.74.6. hammer subnet set-parameter
为子网创建或更新参数
Usage: hammer subnet set-parameter [OPTIONS] Options: --hidden-value BOOLEAN Should the value be hidden --name VALUE Parameter name --parameter-type ENUM Type of the parameter Possible value(s): 'string', 'boolean', 'integer', 'real', 'array', 'hash', 'yaml', 'json' Default: "string" --subnet VALUE Subnet name --subnet-id NUMBER --value VALUE Parameter value -h, --help Print help Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string
3.74.7. Hammer 子网更新
更新子网
Usage: hammer subnet update [OPTIONS] Options: --bmc VALUE BMC Proxy to use within this subnet --bmc-id NUMBER BMC Capsule ID to use within this subnet --boot-mode ENUM Default boot mode for interfaces assigned to this subnet. Possible value(s): 'Static', 'DHCP' --description VALUE Subnet description --dhcp VALUE DHCP Proxy to use within this subnet --dhcp-id NUMBER DHCP Capsule ID to use within this subnet --discovery-id NUMBER ID of Discovery Capsule to use within this subnet for managing connection to discovered hosts --dns VALUE DNS Proxy to use within this subnet --dns-id NUMBER DNS Capsule ID to use within this subnet --dns-primary VALUE Primary DNS for this subnet --dns-secondary VALUE Secondary DNS for this subnet --domain-ids LIST Domains in which this subnet is part --domains LIST --externalipam-group VALUE External IPAM group - only relevant when IPAM is set to external --externalipam-id NUMBER External IPAM Capsule ID to use within this subnet --from VALUE Starting IP Address for IP auto suggestion --gateway VALUE Subnet gateway --httpboot-id NUMBER HTTPBoot Capsule ID to use within this subnet --id NUMBER Subnet numeric identifier --ipam ENUM IP Address auto suggestion mode for this subnet. Possible value(s): 'DHCP', 'Internal DB', 'Random DB', 'EUI-64', 'External IPAM', 'None' --location VALUE Set the current location context for the request --location-id NUMBER Set the current location context for the request --location-ids LIST REPLACE locations with given ids --location-title VALUE Set the current location context for the request --location-titles LIST --locations LIST --mask VALUE Netmask for this subnet --mtu NUMBER MTU for this subnet --name VALUE Subnet name --network VALUE Subnet network --network-type ENUM Type or protocol, IPv4 or IPv6, defaults to IPv4 Possible value(s): 'IPv4', 'IPv6' --new-name VALUE Subnet name --organization VALUE Set the current organization context for the request --organization-id NUMBER Set the current organization context for the request --organization-ids LIST REPLACE organizations with given ids. --organization-title VALUE Set the current organization context for the request --organization-titles LIST --organizations LIST --prefix VALUE Network prefix in CIDR notation (e.g. 64) for this subnet --remote-execution-proxy-ids LIST List of Capsule IDs to be used for remote execution --template-id NUMBER Template HTTP(S) Capsule ID to use within this subnet --tftp VALUE TFTP Proxy to use within this subnet --tftp-id NUMBER TFTP Capsule ID to use within this subnet --to VALUE Ending IP Address for IP auto suggestion --vlanid VALUE VLAN ID for this subnet -h, --help Print help Option details: Here you can find option types and the value an option can accept: BOOLEAN One of true/false, yes/no, 1/0 DATETIME Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format ENUM Possible values are described in the option's description FILE Path to a file KEY_VALUE_LIST Comma-separated list of key=value. JSON is acceptable and preferred way for such parameters LIST Comma separated list of values. Values containing comma should be quoted or escaped with backslash. JSON is acceptable and preferred way for such parameters MULTIENUM Any combination of possible values described in the option's description NUMBER Numeric value. Integer SCHEMA Comma separated list of values defined by a schema. JSON is acceptable and preferred way for such parameters VALUE Value described in the option's description. Mostly simple string