Summary:
Lists available network devices.
Request specification:
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
Used as a filter. Allows to search for a particular devices. To list all available devices, omit the element. |
|
|
|
|
|
Returns:
Name |
Min/Max |
Type |
Description |
|
|
A list of devices according to the specified criteria. |
Description:
To manage network devices for Virtuozzo-based systems, use the implementation of this call in the vzaenvm
interface.
The call retrieves a list of network devices installed on the Hardware Node, including physical network adapters, VLAN adapters, and network bridges. To retrieve a complete list of all available network devices, include the empty net_device
element. To retrieve the devices of a particular type, the devices belonging to a specific network, or a particular device by its ID or IP address, use the net_device
input parameter to compose a filter.
Since Virtuozzo Containers doesn't support Virtuozzo VLAN adapters on Windows, most of the filter options are not used.
The following examples demonstrate how to compose a filter for the most common criteria, but you can filter on any of the fields of the input structure. Depending on the device type, use the appropriate subtype of the net_deviceType
for the net_device
input parameter.
Example 1:
To retrieve a list of all VLAN network adapters, specify the net_vlanType
as the data type of the net_device
element.
Input
<packet xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/networkm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="4.0.0">
<target>vzanetworkm</target>
<data>
<vzanetworkm>
<list>
<net_device xsi:type="ns2:net_vlanType"/>
</list>
</vzanetworkm>
</data>
</packet>
Output
<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns4="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns3="http://www.swsoft.com/webservices/vzl/4.0.0/networkm" xmlns:ns2="http://www.swsoft.com/webservices/vza/4.0.0/vzanetworkm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="17c45c08851t99rd5c" time="2007-01-31T09:49:09+0000" priority="0" version="4.0.0">
<ns1:origin>vzanetworkm</ns1:origin>
<ns1:target>vzclient4</ns1:target>
<ns1:dst>
<ns1:director>gend</ns1:director>
</ns1:dst>
<ns1:data>
<ns2:vzanetworkm>
<ns2:net_device xsi:type="ns3:net_vlanType">
<ns4:id>eth1.1</ns4:id>
<ns3:vlan_id>1</ns3:vlan_id>
<ns3:base_device_id>eth1</ns3:base_device_id>
</ns2:net_device>
<ns2:net_device xsi:type="ns3:net_vlanType">
<ns4:id>eth1.2</ns4:id>
<ns4:network_id>dnpuZXQz</ns4:network_id>
<ns3:vlan_id>2</ns3:vlan_id>
<ns3:base_device_id>eth1</ns3:base_device_id>
</ns2:net_device>
<ns2:net_device xsi:type="ns3:net_vlanType">
<ns4:id>eth1.5</ns4:id>
<ns4:network_id>dnpuZXQ1</ns4:network_id>
<ns3:vlan_id>5</ns3:vlan_id>
<ns3:base_device_id>eth1</ns3:base_device_id>
</ns2:net_device>
</ns2:vzanetworkm>
</ns1:data>
<ns1:src>
<ns1:director>gend</ns1:director>
</ns1:src>
</ns1:packet>
Example 2
To retrieve a list of all network bridges, specify the net_bridgeType
as the data type of the net_device
element.
Input
<packet xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/networkm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="4.0.0">
<target>vzanetworkm</target>
<data>
<vzanetworkm>
<list>
<net_device xsi:type="ns2:net_bridgeType"/>
</list>
</vzanetworkm>
</data>
</packet>
Output
<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns4="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns3="http://www.swsoft.com/webservices/vzl/4.0.0/networkm" xmlns:ns2="http://www.swsoft.com/webservices/vza/4.0.0/vzanetworkm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="18c45c0895dt124rd5c" time="2007-01-31T09:52:44+0000" priority="0" version="4.0.0">
<ns1:origin>vzanetworkm</ns1:origin>
<ns1:target>vzclient4</ns1:target>
<ns1:dst>
<ns1:director>gend</ns1:director>
</ns1:dst>
<ns1:data>
<ns2:vzanetworkm>
<ns2:net_device xsi:type="ns3:net_bridgeType">
<ns4:id>vzbridge1</ns4:id>
<ns4:network_id>vznetw==</ns4:network_id>
</ns2:net_device>
<ns2:net_device xsi:type="ns3:net_bridgeType">
<ns4:id>vzbridge2</ns4:id>
<ns4:network_id>dnpuZXQx</ns4:network_id>
</ns2:net_device>
<ns2:net_device xsi:type="ns3:net_bridgeType">
<ns4:id>vzbridge3</ns4:id>
<ns4:network_id>dnpuZXQz</ns4:network_id>
</ns2:net_device>
<ns2:net_device xsi:type="ns3:net_bridgeType">
<ns4:id>vzbridge5</ns4:id>
<ns4:network_id>dnpuZXQ1</ns4:network_id>
</ns2:net_device>
</ns2:vzanetworkm>
</ns1:data>
<ns1:src>
<ns1:director>gend</ns1:director>
</ns1:src>
</ns1:packet>
Example 3
Retrieving all devices belonging to the specified network ID.
Input
<packet version="4.0.0">
<target>vzanetworkm</target>
<data>
<vzanetworkm>
<list>
<net_device>
<network_id>dnpuZXQ1</network_id>
</net_device>
</list>
</vzanetworkm>
</data>
</packet>
Output
<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns4="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns3="http://www.swsoft.com/webservices/vzl/4.0.0/networkm" xmlns:ns2="http://www.swsoft.com/webservices/vza/4.0.0/vzanetworkm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="19c45c08a1bt305erd5c" time="2007-01-31T09:55:15+0000" priority="0" version="4.0.0">
<ns1:origin>vzanetworkm</ns1:origin>
<ns1:target>vzclient4</ns1:target>
<ns1:dst>
<ns1:director>gend</ns1:director>
</ns1:dst>
<ns1:data>
<ns2:vzanetworkm>
<ns2:net_device xsi:type="ns3:net_bridgeType">
<ns4:id>vzbridge5</ns4:id>
<ns4:network_id>dnpuZXQ1</ns4:network_id>
</ns2:net_device>
<ns2:net_device xsi:type="ns3:net_vlanType">
<ns4:id>eth1.5</ns4:id>
<ns4:network_id>dnpuZXQ1</ns4:network_id>
<ns3:vlan_id>5</ns3:vlan_id>
<ns3:base_device_id>eth1</ns3:base_device_id>
</ns2:net_device>
</ns2:vzanetworkm>
</ns1:data>
<ns1:src>
<ns1:director>gend</ns1:director>
</ns1:src>
</ns1:packet>
Example 4
To retrieve the list of the installed physical network adapters, specify the net_nicType
as the data type of the net_device
element.
Input
<packet xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="4.0.0">
<target>vzanetworkm</target>
<data>
<vzanetworkm>
<list>
<net_device xsi:type="ns2:net_nicType"/>
</list>
</vzanetworkm>
</data>
</packet>
Output
<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns3="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns2="http://www.swsoft.com/webservices/vza/4.0.0/vzanetworkm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="22c45c76508t74dree0" time="2007-02-04T08:37:28+0000" priority="0" version="4.0.0">
<ns1:origin>vzanetworkm</ns1:origin>
<ns1:target>vzclient8</ns1:target>
<ns1:dst>
<ns1:director>gend</ns1:director>
</ns1:dst>
<ns1:data>
<ns2:vzanetworkm>
<ns2:net_device xsi:type="ns3:net_nicType">
<ns3:id>eth0</ns3:id>
<ns3:ip_address>
<ns3:netmask>255.255.252.0</ns3:netmask>
<ns3:ip>192.168.0.250</ns3:ip>
</ns3:ip_address>
<ns3:network_id>dnpuZXQ1</ns3:network_id>
<ns3:mac_address>00:0c:29:60:4c:7f</ns3:mac_address>
</ns2:net_device>
<ns2:net_device xsi:type="ns3:net_nicType">
<ns3:id>eth1</ns3:id>
<ns3:ip_address>
<ns3:netmask>255.255.255.0</ns3:netmask>
<ns3:ip>192.168.12.133</ns3:ip>
</ns3:ip_address>
<ns3:mac_address>00:0c:29:60:4c:89</ns3:mac_address>
</ns2:net_device>
</ns2:vzanetworkm>
</ns1:data>
<ns1:src>
<ns1:director>gend</ns1:director>
</ns1:src>
</ns1:packet>
Example 5
Retrieving a list of all available network devices.
Input
<packet version="4.0.0">
<target>vzanetworkm</target>
<data>
<vzanetworkm>
<list>
<net_device/>
</list>
</vzanetworkm>
</data>
</packet>
Output
<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns3="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns2="http://www.swsoft.com/webservices/vza/4.0.0/vzanetworkm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="39c45c84c6bt260dree0" time="2007-02-06T09:39:51+0000" priority="0" version="4.0.0">
<ns1:origin>vzanetworkm</ns1:origin>
<ns1:target>vzclient9</ns1:target>
<ns1:dst>
<ns1:director>gend</ns1:director>
</ns1:dst>
<ns1:data>
<ns2:vzanetworkm>
<ns2:net_device xsi:type="ns3:net_nicType">
<ns3:id>AMD PCNET Family PCI Ethernet Adapter #2</ns3:id>
<ns3:mac_address>00:0c:29:23:76:30</ns3:mac_address>
</ns2:net_device>
<ns2:net_device xsi:type="ns3:net_nicType">
<ns3:id>AMD PCNET Family PCI Ethernet Adapter - SWSoft network bridge</ns3:id>
<ns3:mac_address>00:0c:29:23:76:26</ns3:mac_address>
</ns2:net_device>
</ns2:vzanetworkm>
</ns1:data>
<ns1:src>
<ns1:director>gend</ns1:director>
</ns1:src>
</ns1:packet>