专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > Tivoli

Find and retrieve resources by VTMOS例子出有关问题

发布时间:2010-06-13 13:29:05 文章来源:www.iduyao.cn 采编人员:星星草
Find and retrieve resources by VTMOS例子出问题
本帖最后由 WHW1984 于 2010-11-09 18:13:56 编辑 我看Tivoli的ncm_pdf_api_61.pdf文档,里面的Find and retrieve resources by VTMOS这个例子。
代码如下:
public void findAndRetrieveResourceByVTMOS()
    {
        ResourceManager rMgr;
        ResourceContainerKey containerKey = null;
        boolean subrealmsFlag = false;
        String vendor = "*";
        String type = "*";
        String model = "*";
        String os = "*"; 
        try
        {
            rMgr = Connection.getInstance().apiSession.resourceManager();

            // set up search criterion based on vendor/type/model/os
            // setting a null value is the same as "*"
            // for example setVendor(null) means the same as setVendor(*)
            VtmosCriterion vtmos = rMgr.dataFactory().newVtmosCriterion();
            vtmos.setVendor(vendor);
            vtmos.setType(type);
            vtmos.setModel(model);
            vtmos.setOsVersion(os);

            ResourceSearch rs = rMgr.dataFactory().newResourceSearch();
            rs.setCriterion(vtmos);
            rs.setResourceName(null);
//            ArrayList<String> rTypeAL = new ArrayList<String>();
//            rTypeAL.add(Resource.RESOURCE_COMMANDSET); // set resource type(s) as needed
//            rs.setResourceTypes(rTypeAL);
            
            ResourceContainerDescriptor realmRCD = rMgr.getContainer("root/3k");
            if(realmRCD!=null){
                containerKey = realmRCD.getKey();
            }
            rs.setStartingContainer(containerKey);
            rs.setSubRealms(subrealmsFlag);

            // now do the search
            @SuppressWarnings("unchecked")
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。

其他相似内容:

热门推荐: