14.7. 하위 항목
14.7.1. 호스트 네트워크 첨부 하위 항목 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
network_attachments 하위 수집은 호스트의 네트워크 구성을 나타냅니다. 각 network_attachment 요소는 호스트에 연결된 네트워크를 나타내며 다음 요소를 포함합니다.
|
요소
|
유형
|
설명
|
속성
|
|---|---|---|---|
네트워크 ID=
|
GUID
|
호스트가 연결된 네트워크에 대한 참조입니다.
|
|
host_nic id=
|
GUID
|
네트워크가 연결된 호스트 네트워크 인터페이스에 대한 참조입니다.
|
|
ip_address_assignments
|
complex
|
네트워크의 IP 구성입니다. 각
ip_address_assignment 에는 assignment_method 및 ip address= 넷마스크= gateway= sub-elements가 포함되어 있습니다.
| |
속성
|
complex
|
네트워크의 사용자 지정 속성 키를 정의합니다. 각
속성에 는 name 및 value 하위 요소가 포함되어 있습니다. 14.7.2.3.2절. “네트워크 연결 사용자 정의 속성”을 참조하십시오.
| |
reported_configurations
|
complex
|
네트워크 연결의 구성 속성 읽기 전용 목록입니다. 네트워크 연결이 데이터 센터의 논리 네트워크 정의와 동기화되지 않으면
in_sync 부울이 false 입니다. 각 reported_configuration 에는 name,expected_value,actual_value, in_sync 하위 요소가 포함되어 있습니다.
|
|
호스트 ID=
|
GUID
|
호스트에 대한 참조입니다.
|
|
예 14.9. 호스트의 네트워크 연결의 XML 표현
<network_attachment href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000">
<network href="/ovirt-engine/api/networks/00000000-0000-0000-0000-000000000009" id="00000000-0000-0000-0000-000000000009"/>
<host_nic href="/ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"/>
<ip_address_assignments>
<ip_address_assignment>
<ip address="XX.XX.XX.XX" netmask="255.255.255.0" gateway="XX.XX.XX.XX"/>
<assignment_method>dhcp</assignment_method>
</ip_address_assignment>
</ip_address_assignments>
<reported_configurations>
<in_sync>true</in_sync>
<reported_configuration>
<name>mtu</name>
<expected_value>1500</expected_value>
<actual_value>1500</actual_value>
<in_sync>true</in_sync>
</reported_configuration>
<reported_configuration>
<name>bridged</name>
<expected_value>true</expected_value>
<actual_value>true</actual_value>
<in_sync>true</in_sync>
</reported_configuration>
<reported_configuration>
<name>vlan</name>
<in_sync>true</in_sync>
</reported_configuration>
<reported_configuration>
<name>boot_protocol</name>
<expected_value>DHCP</expected_value>
<actual_value>DHCP</actual_value>
<in_sync>true</in_sync>
</reported_configuration>
</reported_configurations>
<host href="/ovirt-engine/api/hosts/f59a29cd-587d-48a3-b72a-db537eb21957" id="f59a29cd-587d-48a3-b72a-db537eb21957"/>
</network_attachment>
호스트에 네트워크를 연결할 때
id 또는 name 이 있는 network 및 host_nic 요소가 필요합니다. host_nic ID는 사용되지 않은 네트워크 인터페이스 카드 또는 본딩을 참조할 수 있습니다.
예 14.10. 호스트에 네트워크 연결
POST /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments HTTP/1.1
Accept: application/xml
Content-type: application/xml
<network_attachment>
<network id="00000000-0000-0000-0000-000000000000"/>
<host_nic id="00000000-0000-0000-0000-000000000000"/>
</network_attachment>
host_nic,ip_address_assignments 및 properties 요소는 updatable post-creation입니다. host_nic ID를 변경하면 네트워크를 다른 네트워크 인터페이스 카드로 이동합니다.
예 14.11. 호스트 네트워크 연결 수정
PUT /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml
<network_attachment>
<host_nic id="00000000-0000-0000-0000-000000000000"/>
<ip_address_assignments>
<ip_address_assignment>
<ip address="XX.XX.XX.XX" netmask="255.255.255.0" gateway="XX.XX.XX.XX"/>
<assignment_method>static</assignment_method>
</ip_address_assignment>
</ip_address_assignments>
<properties>
<property>
<name>bridge_opts</name>
<value>
forward_delay=1500 group_fwd_mask=0x0 multicast_snooping=1
</value>
</property>
</properties>
</network_attachment>
네트워크 연결에서
DELETE 요청이 있는 호스트에서 네트워크를 분리합니다.
예 14.12. 호스트에서 네트워크 분리
DELETE /ovirt-engine/api/hosts/00000000-0000-0000-0000-000000000000/nics/00000000-0000-0000-0000-000000000000/networkattachments/00000000-0000-0000-0000-000000000000 HTTP/1.1
Accept: application/xml
Content-type: application/xml
HTTP/1.1 204 No Content
중요
네트워크 연결 구성 변경 사항을 명시적으로 커밋해야 합니다. 14.8.8절. “호스트 네트워크 구성 작업 커밋”을 참조하십시오.


