GET /api/hosts/:host_id/interfaces
List all interfaces for host

GET /api/domains/:domain_id/interfaces
List all interfaces for domain

GET /api/subnets/:subnet_id/interfaces
List all interfaces for subnet

参数

参数名字 描述
host_id
必填

ID or name of host

Validations:

  • Must be String

domain_id
选填

ID or name of domain

Validations:

  • Must be String

subnet_id
选填

ID or name of subnet

Validations:

  • Must be String

page
选填

页数

Validations:

  • Must be String

per_page
选填

每个请求中的条目数

Validations:

  • Must be String


GET /api/hosts/:host_id/interfaces/:id
Show an interface for host

参数

参数名字 描述
host_id
必填

ID or name of host

Validations:

  • Must be String

id
必填

ID or name of interface

Validations:

  • Must be String


POST /api/hosts/:host_id/interfaces
Create an interface on a host

参数

参数名字 描述
host_id
必填

ID or name of host

Validations:

  • Must be String

interface
必填

interface information

Validations:

  • Must be a Hash

interface[mac]
选填 , 允许空值

MAC address of interface. Required for managed interfaces on bare metal.

Validations:

  • Must be String

interface[ip]
选填 , 允许空值

IP address of interface

Validations:

  • Must be String

interface[type]
选填 , 允许空值

Interface type, e.g. bmc. Default is interface

Validations:

  • Must be one of: interface, bmc, bond, bridge.

interface[name]
选填 , 允许空值

Interface's DNS name

Validations:

  • Must be String

interface[subnet_id]
选填 , 允许空值

Foreman subnet ID of interface

Validations:

  • Must be Fixnum

interface[domain_id]
选填 , 允许空值

Foreman domain ID of interface. Required for primary interfaces on managed hosts.

Validations:

  • Must be Fixnum

interface[identifier]
选填 , 允许空值

Device identifier, e.g. eth0 or eth1.1

Validations:

  • Must be String

interface[managed]
选填 , 允许空值

Should this interface be managed via DHCP and DNS smart proxy and should it be configured during provisioning?

Validations:

  • Must be 'true' or 'false' or '1' or '0'

interface[primary]
选填 , 允许空值

Should this interface be used for constructing the FQDN of the host? Each managed hosts needs to have one primary interface.

Validations:

  • Must be 'true' or 'false' or '1' or '0'

interface[provision]
选填 , 允许空值

Should this interface be used for TFTP of PXELinux (or SSH for image-based hosts)? Each managed hosts needs to have one provision interface.

Validations:

  • Must be 'true' or 'false' or '1' or '0'

interface[username]
选填 , 允许空值

Only for BMC interfaces.

Validations:

  • Must be String

interface[password]
选填 , 允许空值

Only for BMC interfaces.

Validations:

  • Must be String

interface[provider]
选填 , 允许空值

Interface provider, e.g. IPMI. Only for BMC interfaces.

Validations:

  • Must be one of: IPMI.

interface[virtual]
选填 , 允许空值

Alias or VLAN device

Validations:

  • Must be 'true' or 'false' or '1' or '0'

interface[tag]
选填 , 允许空值

VLAN tag, this attribute has precedence over the subnet VLAN ID. Only for virtual interfaces.

Validations:

  • Must be String

interface[attached_to]
选填 , 允许空值

Identifier of the interface to which this interface belongs, e.g. eth1. Only for virtual interfaces.

Validations:

  • Must be String

interface[mode]
选填 , 允许空值

Bond mode of the interface, e.g. balance-rr. Only for bond interfaces.

Validations:

  • Must be one of: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb.

interface[attached_devices]
选填 , 允许空值

Identifiers of attached interfaces, e.g. `['eth1', 'eth2']`. For bond interfaces those are the slaves. Only for bond and bridges interfaces.

Validations:

  • Must be an array of any type

interface[bond_options]
选填 , 允许空值

Space separated options, e.g. miimon=100. Only for bond interfaces.

Validations:

  • Must be String

interface[compute_attributes]
选填 , 允许空值

Additional compute resource specific attributes for the interface.

Validations:

  • Must be Hash


PUT /api/hosts/:host_id/interfaces/:id
Update a host's interface

参数

参数名字 描述
host_id
必填

ID or name of host

Validations:

  • Must be String

id
必填

ID of interface

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

interface
必填

interface information

Validations:

  • Must be a Hash

interface[mac]
选填 , 允许空值

MAC address of interface. Required for managed interfaces on bare metal.

Validations:

  • Must be String

interface[ip]
选填 , 允许空值

IP address of interface

Validations:

  • Must be String

interface[type]
选填 , 允许空值

Interface type, e.g. bmc. Default is interface

Validations:

  • Must be one of: interface, bmc, bond, bridge.

interface[name]
选填 , 允许空值

Interface's DNS name

Validations:

  • Must be String

interface[subnet_id]
选填 , 允许空值

Foreman subnet ID of interface

Validations:

  • Must be Fixnum

interface[domain_id]
选填 , 允许空值

Foreman domain ID of interface. Required for primary interfaces on managed hosts.

Validations:

  • Must be Fixnum

interface[identifier]
选填 , 允许空值

Device identifier, e.g. eth0 or eth1.1

Validations:

  • Must be String

interface[managed]
选填 , 允许空值

Should this interface be managed via DHCP and DNS smart proxy and should it be configured during provisioning?

Validations:

  • Must be 'true' or 'false' or '1' or '0'

interface[primary]
选填 , 允许空值

Should this interface be used for constructing the FQDN of the host? Each managed hosts needs to have one primary interface.

Validations:

  • Must be 'true' or 'false' or '1' or '0'

interface[provision]
选填 , 允许空值

Should this interface be used for TFTP of PXELinux (or SSH for image-based hosts)? Each managed hosts needs to have one provision interface.

Validations:

  • Must be 'true' or 'false' or '1' or '0'

interface[username]
选填 , 允许空值

Only for BMC interfaces.

Validations:

  • Must be String

interface[password]
选填 , 允许空值

Only for BMC interfaces.

Validations:

  • Must be String

interface[provider]
选填 , 允许空值

Interface provider, e.g. IPMI. Only for BMC interfaces.

Validations:

  • Must be one of: IPMI.

interface[virtual]
选填 , 允许空值

Alias or VLAN device

Validations:

  • Must be 'true' or 'false' or '1' or '0'

interface[tag]
选填 , 允许空值

VLAN tag, this attribute has precedence over the subnet VLAN ID. Only for virtual interfaces.

Validations:

  • Must be String

interface[attached_to]
选填 , 允许空值

Identifier of the interface to which this interface belongs, e.g. eth1. Only for virtual interfaces.

Validations:

  • Must be String

interface[mode]
选填 , 允许空值

Bond mode of the interface, e.g. balance-rr. Only for bond interfaces.

Validations:

  • Must be one of: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, balance-alb.

interface[attached_devices]
选填 , 允许空值

Identifiers of attached interfaces, e.g. `['eth1', 'eth2']`. For bond interfaces those are the slaves. Only for bond and bridges interfaces.

Validations:

  • Must be an array of any type

interface[bond_options]
选填 , 允许空值

Space separated options, e.g. miimon=100. Only for bond interfaces.

Validations:

  • Must be String

interface[compute_attributes]
选填 , 允许空值

Additional compute resource specific attributes for the interface.

Validations:

  • Must be Hash


DELETE /api/hosts/:host_id/interfaces/:id
Delete a host's interface

参数

参数名字 描述
host_id
必填

ID or name of host

Validations:

  • Must be String

id
必填

ID of interface

Validations:

  • Must be String