Summary:
Allows to retrieve a list of packages available on the Hardware Node or installed in a Virtuozzo Container.
Request specification:
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
|
Listing options. |
|
|
|
|
|
|
|
The type(s) of packages to retrieve. If absent, retrieves all types. The available options are:
|
|
|
|
If present, a summary info will be included in the result. |
|
|
|
If present, only the packages that are compatible with the OS template used by the specified server will be included in the result. |
|
|
|
|
|
|
|
|
Returns:
Name |
Min/Max |
Type |
Description |
|
|
The requested package information. |
Description:
When examining the returned package list, the type of the package is determined based on the data type of the structure that contains the package information.
For example, the following XML code segment contains information about a Virtuozzo EZ template. We know that because the type of the package
element is package_vztemplateType
.
<ns2:package xsi:type="ns3:package_vztemplateType">
<ns4:name>.redhat-el5-x86</ns4:name>
<ns4:os xsi:type="ns4:osType">
<ns4:platform>Linux</ns4:platform>
<ns4:name/>
</ns4:os>
<ns4:arch>x86</ns4:arch>
<ns3:os_template>1</ns3:os_template>
<ns3:cached>0</ns3:cached>
<ns3:uptodate>0</ns3:uptodate>
</ns2:package>
The following segment contains information about a Virtuozzo standard template, because the type of the package element in this case is package_std_vztemplateType
.
<ns2:package xsi:type="ns3:package_std_vztemplateType">
<ns4:name>redhat-as3-minimal</ns4:name>
<ns4:version>20061020</ns4:version>
<ns4:os xsi:type="ns4:osType">
<ns4:platform>Linux</ns4:platform>
<ns4:name/>
</ns4:os>
<ns4:arch>x86</ns4:arch>
<ns3:os_template>1</ns3:os_template>
<ns3:cached>1</ns3:cached>
<ns3:uptodate>0</ns3:uptodate>
<ns3:technology>nptl</ns3:technology>
<ns3:technology>x86</ns3:technology>
<ns3:base>1</ns3:base>
</ns2:package>
</ns2:packages>
EZ Template Names
Internally, Agent uses a dot notation for identifying EZ Template packages. The dot is always placed in front of an EZ template name. When you create an EZ template yourself, make sure to begin the name of your template with the dot character. If you have created a Virtuozzo EZ template, then installed it on the Hardware Node, but don't see it in the list produced by this call, then it's probably because the name of your template does not have the dot character.
Example:
Retrieving a list of the OS templates installed on the Hardware Node.
Input
<packet version="4.0.0">
<target>vzapackagem</target>
<data>
<vzapackagem>
<list>
<options>
<type>os</type>
</options>
</list>
</vzapackagem>
</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:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/packagem" xmlns:ns3="http://www.swsoft.com/webservices/vza/4.0.0/vzatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="3dc468a338bt440dre4" time="2007-07-03T15:03:45+0000" priority="0" version="4.0.0">
<ns1:origin>vzapackagem</ns1:origin>
<ns1:target>vzclient5-b38361f0-6737-1342-9f9a-03b8fcca2130</ns1:target>
<ns1:dst>
<ns1:director>gend</ns1:director>
</ns1:dst>
<ns1:data>
<ns2:vzapackagem>
<ns2:packages>
<ns2:package xsi:type="ns3:package_vztemplateType">
<ns4:name>.redhat-el5-x86</ns4:name>
<ns4:os xsi:type="ns4:osType">
<ns4:platform>Linux</ns4:platform>
<ns4:name/>
</ns4:os>
<ns4:arch>x86</ns4:arch>
<ns3:os_template>1</ns3:os_template>
<ns3:cached>0</ns3:cached>
<ns3:uptodate>0</ns3:uptodate>
</ns2:package>
<ns2:package xsi:type="ns3:package_std_vztemplateType">
<ns4:name>redhat-as3-minimal</ns4:name>
<ns4:version>20061020</ns4:version>
<ns4:os xsi:type="ns4:osType">
<ns4:platform>Linux</ns4:platform>
<ns4:name/>
</ns4:os>
<ns4:arch>x86</ns4:arch>
<ns3:os_template>1</ns3:os_template>
<ns3:cached>1</ns3:cached>
<ns3:uptodate>0</ns3:uptodate>
<ns3:technology>nptl</ns3:technology>
<ns3:technology>x86</ns3:technology>
<ns3:base>1</ns3:base>
</ns2:package>
</ns2:packages>
</ns2:vzapackagem>
</ns1:data>
<ns1:src>
<ns1:director>gend</ns1:director>
</ns1:src>
</ns1:packet>
Example:
Getting a list of packages installed on the specified Virtuozzo Container.
Input
<packet version="4.0.0">
<target>vzapackagem</target>
<data>
<vzapackagem>
<list>
<eid>f3ed6747-9d77-654a-b133-e2950ea704ee</eid>
</list>
</vzapackagem>
</data>
</packet>
Output
<?xml version="1.0" encoding="UTF-8"?><packet xmlns:ns3="http://www.swsoft.com/webservices/vzl/4.0.0/types" xmlns:ns1="http://www.swsoft.com/webservices/vzl/4.0.0/packagem" xmlns:ns2="http://www.swsoft.com/webservices/vza/4.0.0/vzatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="4.0.0" priority="0" id="3c4799b7a4t6784ra9c" time="2008-01-24T04:00:48+0000">
<origin>vzapackagem</origin>
<target>vzclient3-9634f0ee-8c54-924d-9193-64f79dfc8736</target>
<dst>
<director>gend</director>
</dst>
<data>
<vzapackagem>
<packages>
<package xsi:type="ns2:package_std_vztemplateType">
<name>redhat-as3-minimal</name>
<version>20061020</version>
<os xsi:type="ns3:osType">
<platform>Linux</platform>
<name></name>
</os>
<arch>x86</arch>
<os_template>1</os_template>
<cached>1</cached>
<uptodate>0</uptodate>
<technology>nptl</technology>
<technology>x86</technology>
<base>1</base>
</package>
</packages>
</vzapackagem>
</data>
<src>
<director>gend</director>
</src>
</packet>