Previous page

Next page

Locate page in Contents

Print this page

get_sample_conf

Summary:

Retrieves a list of sample configurations from a Hardware Node.

Request specification:

Name

Min/Max

Type

Description

get_sample_conf

 

 

 

{

 

 

 

sample_id

0..[]

string

A list of IDs of sample configurations to include in the result set. If none specified, all available sample configurations will be retrieved.

eid

0..1

eid_type

Server ID. If specified, retrieves only the sample configurations that can be used to create virtual machines on the specified host.

}

 

 

 

Returns:

Name

Min/Max

Type

Description

sample_conf

0..[]

sample_confType

Sample configuration data.

Description:

The get_sample_conf call allows to perform the following tasks:

The following examples demonstrate how to perform each of the tasks described above.

Example 1:

Retrieving a list of all sample configurations available on the Hardware Node (or in the entire Virtuozzo group, if we are connected to the Master Node).

Input

<packet version="4.0.0">

<target>env_samplem</target>

<data>

<env_samplem>

<get_sample_conf/>

</env_samplem>

</data>

</packet>

Output

<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:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/env_samplem" xmlns:ns3="http://www.swsoft.com/webservices/vza/4.0.0/vzatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="2c45ec0951t18ber1a0" time="2007-03-05T09:09:34+0000" priority="0" version="4.0.0">

<ns1:origin>env_samplem</ns1:origin>

<ns1:target>vzclient4</ns1:target>

<ns1:dst>

<ns1:director>gend</ns1:director>

</ns1:dst>

<ns1:data>

<ns2:env_samplem>

<ns2:sample_conf>

<!-- Virtuozzo Container configuration data -->

<ns2:env_config xsi:type="ns3:venv_configType">

<ns4:os xsi:type="ns4:osType">

<ns4:platform>Linux</ns4:platform>

<ns4:name/>

</ns4:os>

<ns4:architecture>i686</ns4:architecture>

<ns4:type>virtuozzo</ns4:type>

<ns4:on_boot>0</ns4:on_boot>

<ns4:offline_management>1</ns4:offline_management>

<ns4:qos>

<ns4:id>avnumproc</ns4:id>

<ns4:hard>40</ns4:hard>

</ns4:qos>

<ns4:qos>

<ns4:id>cpuunits</ns4:id>

<ns4:hard>1000</ns4:hard>

</ns4:qos>

<!-- The rest of the <qos> parameters are omitted for brevity -->

<ns4:qos>

<ns4:id>vmguarpages</ns4:id>

<ns4:hard>2147483647</ns4:hard>

<ns4:soft>6144</ns4:soft>

</ns4:qos>

</ns2:env_config>

<!-- Sample configuration ID, name, etc. -->

<ns2:id>0bd2ca65-8928-4f0d-8396-e8cba58dada0</ns2:id>

<ns2:name>vps.confixx</ns2:name>

<ns2:vt_version>

<ns2:platform>Linux</ns2:platform>

<ns2:architecture>i686</ns2:architecture>

<ns2:vt_technology>virtuozzo</ns2:vt_technology>

</ns2:vt_version>

</ns2:sample_conf>

</ns2:env_samplem>

</ns1:data>

<ns1:src>

<ns1:director>gend</ns1:director>

</ns1:src>

</ns1:packet>

Example 2:

Retrieving a specific sample configuration.

Input

<packet version="4.0.0">

<target>env_samplem</target>

<data>

<env_samplem>

<get_sample_conf>

<sample_id>0bd2ca65-8928-4f0d-8396-e8cba58dada0</sample_id>

</get_sample_conf>

</env_samplem>

</data>

</packet>

The output here is similar to the output shown in the previous example.

Example 3:

Retrieving a list of sample configurations that can be used to create Virtuozzo Containers.

Input

<packet version="4.0.0" id="2">

<target>server_group</target>

<data>

<server_group>

<get_list>

<type>generic</type>

</get_list>

</server_group>

</data>

</packet>

Output

<?xml version="1.0" encoding="UTF-8"?><ns1:packet xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/protocol" xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/server_group" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="dc45ed4e57t41bbr274" time="2007-03-06T09:05:31+0000" priority="0" version="4.0.0">

<ns1:origin>server_group</ns1:origin>

<ns1:target>vzclient5</ns1:target>

<ns1:dst>

<ns1:director>gend</ns1:director>

</ns1:dst>

<ns1:data>

<ns2:server_group>

<ns2:eid>565b96bd-d2da-4c7e-a212-0943a4bd6b29</ns2:eid>

</ns2:server_group>

</ns1:data>

<ns1:src>

<ns1:director>gend</ns1:director>

</ns1:src>

</ns1:packet>

Now, that we have the Server ID of the host, use the get_sample_conf call to get the list of the compatible sample configurations.

Input

<packet version="4.0.0">

<target>env_samplem</target>

<data>

<env_samplem>

<get_sample_conf>

<eid>565b96bd-d2da-4c7e-a212-0943a4bd6b29</eid>

</get_sample_conf>

</env_samplem>

</data>

</packet>

Please send us your feedback on this help page