Package com.cloud.utils.xmlobject

Examples of com.cloud.utils.xmlobject.XmlObject


        UcsManagerVO mgrvo = ucsDao.findById(ucsMgrId);
        UcsHttpClient client = new UcsHttpClient(mgrvo.getUrl());
        String cookie = getCookie(ucsMgrId);
        String cmd = UcsCommands.configResolveDn(cookie, dn);
        String res = client.call(cmd);
        XmlObject xo = XmlObjectParser.parseFromString(res);
        return xo.get("outConfig.computeBlade.association").equals("associated");
    }
View Full Code Here


        return xo.evaluateObject(p);
    }
   
    public static List<UcsProfile> fromXmlString(String xmlstr) {
        List<UcsProfile> ps = new ArrayList<UcsProfile>();
        XmlObject xo = XmlObjectParser.parseFromString(xmlstr);
        List<XmlObject> xos = xo.getAsList("outDns.dn");
        if (xos != null) {
            for (XmlObject x : xos) {
                //UcsProfile p = UcsProfile.fromXmlObject(x);
                UcsProfile p = new UcsProfile();
                p.setDn(x.get("value").toString());
View Full Code Here

    String operPower;
    String totalMemory;
    String uuid;
   
    public static List<ComputeBlade> fromXmString(String xmlstr) {
        XmlObject root = XmlObjectParser.parseFromString(xmlstr);
        List<XmlObject> lst = root.getAsList("outConfigs.computeBlade");
        List<ComputeBlade> blades = new ArrayList<ComputeBlade>();
        if (lst == null) {
            return blades;
        }
        for (XmlObject xo : lst) {
View Full Code Here

import com.cloud.utils.xmlobject.XmlObject;

public class UcsCommands {
    public static String loginCmd(String username, String password) {
        XmlObject cmd = new XmlObject("aaaLogin");
        cmd.putElement("inName", username);
        cmd.putElement("inPassword", password);
        return cmd.dump();
    }
View Full Code Here

        cmd.putElement("inPassword", password);
        return cmd.dump();
    }
   
    public static String listComputeBlades(String cookie) {
        XmlObject cmd = new XmlObject("configResolveClass");
        cmd.putElement("classId", "computeBlade");
        cmd.putElement("cookie", cookie);
        cmd.putElement("inHierarchical", "false");
        return cmd.dump();
    }
View Full Code Here

        cmd.putElement("inHierarchical", "false");
        return cmd.dump();
    }
   
    public static String listProfiles(String cookie) {
        XmlObject cmd = new XmlObject("configFindDnsByClassId");
        cmd.putElement("classId", "lsServer");
        cmd.putElement("cookie", cookie);
        return cmd.dump();
    }
View Full Code Here

        cmd.putElement("cookie", cookie);
        return cmd.dump();
    }
   
    public static String cloneProfile(String cookie, String srcDn, String newProfileName) {
        XmlObject cmd = new XmlObject("lsClone");
        cmd.putElement("cookie", cookie);
        cmd.putElement("dn", srcDn);
        cmd.putElement("inTargetOrg", "org-root");
        cmd.putElement("inServerName", newProfileName);
        cmd.putElement("inHierarchical", "false");
        return cmd.dump();
    }
View Full Code Here

TOP

Related Classes of com.cloud.utils.xmlobject.XmlObject

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.