Esempi

PUT /api/hosts/host2643/interfaces/7
{
  "interface": {
    "name": "wuhebbfueg"
  }
}
200
{
  "subnet_id": null,
  "subnet_name": null,
  "subnet6_id": null,
  "subnet6_name": null,
  "domain_id": null,
  "domain_name": null,
  "created_at": "2019-09-11 14:58:36 UTC",
  "updated_at": "2019-09-11 14:58:36 UTC",
  "managed": true,
  "identifier": "eth844",
  "id": 7,
  "name": "wuhebbfueg",
  "ip": "0.0.0.195",
  "ip6": null,
  "mac": "00:33:45:ab:01:3e",
  "mtu": null,
  "fqdn": "wuhebbfueg",
  "primary": false,
  "provision": false,
  "type": "interface",
  "virtual": false
}

Parametri

Nome parametro Descrizione
location_id
opzionale

Scopo per posizioni

Validations:

  • Must be a Integer

organization_id
opzionale

Scopo per organizzazioni

Validations:

  • Must be a Integer

host_id
richiesto

ID o nome dell’host

Validations:

  • Must be a String

id
richiesto

ID interfaccia

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
richiesto

informazioni sull’interfaccia

Validations:

  • Must be a Hash

interface[mac]
opzionale , consentito nil

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

Validations:

  • Must be a String

interface[ip]
opzionale , consentito nil

IPv4 address of interface

Validations:

  • Must be a String

interface[ip6]
opzionale , consentito nil

IPv6 address of interface

Validations:

  • Must be a String

interface[type]
opzionale , consentito nil

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

Validations:

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

interface[name]
opzionale , consentito nil

Interface’s DNS name

Validations:

  • Must be a String

interface[subnet_id]
opzionale , consentito nil

Foreman subnet ID of IPv4 interface

Validations:

  • Must be a number.

interface[subnet6_id]
opzionale , consentito nil

Foreman subnet ID of IPv6 interface

Validations:

  • Must be a number.

interface[domain_id]
opzionale , consentito nil

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

Validations:

  • Must be a number.

interface[identifier]
opzionale , consentito nil

Identificatore del dispositivo, es. eth0 o eth1.1

Validations:

  • Must be a String

interface[managed]
opzionale , consentito nil

L’interfaccia deve essere gestita tramite DHCP e DNS smart proxy e può essere configurarta durante il provisioning?

Validations:

  • Must be one of: true, false, 1, 0.

interface[primary]
opzionale , consentito nil

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

Validations:

  • Must be one of: true, false, 1, 0.

interface[provision]
opzionale , consentito nil

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 one of: true, false, 1, 0.

interface[username]
opzionale , consentito nil

Solo per interfacce BMC.

Validations:

  • Must be a String

interface[password]
opzionale , consentito nil

Solo per interfacce BMC.

Validations:

  • Must be a String

interface[provider]
opzionale , consentito nil

Provider dell’interfaccia, es IPMI. Solo per le interfacce BMC.

Validations:

  • Must be one of: IPMI, SSH.

interface[virtual]
opzionale , consentito nil

Dispositivo VLAN o Alias

Validations:

  • Must be one of: true, false, 1, 0.

interface[tag]
opzionale , consentito nil

VLAN tag, questo attributo ha la precedenza rispetto a VLAN ID. Solo per interfacce virtuali.

Validations:

  • Must be a String

interface[mtu]
opzionale , consentito nil

MTU, this attribute has precedence over the subnet MTU.

Validations:

  • Must be a Integer

interface[attached_to]
opzionale , consentito nil

Identificatore dell’interfaccia alla quale appartiene questa interfaccia, es. eth1. Solo per interfacce virtuali.

Validations:

  • Must be a String

interface[mode]
opzionale , consentito nil

Modalità associazione dell’interfaccia, es balance-rr. Solo per interfacce di aggregazione.

Validations:

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

interface[attached_devices]
opzionale , consentito nil

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]
opzionale , consentito nil

Opzioni separate da spazi, es. miimon=100. Solo per interfacce di aggregazione.

Validations:

  • Must be a String

interface[compute_attributes]
opzionale , consentito nil

Additional compute resource specific attributes for the interface.

Validations:

  • Must be a Hash