use of com.cloud.ucs.structure.UcsProfile in project cloudstack by apache.
the class UcsManagerImpl method listUcsProfiles.
@Override
public ListResponse<UcsProfileResponse> listUcsProfiles(ListUcsProfileCmd cmd) {
List<UcsProfile> profiles = getUcsProfiles(cmd.getUcsManagerId());
ListResponse<UcsProfileResponse> response = new ListResponse<UcsProfileResponse>();
List<UcsProfileResponse> rs = new ArrayList<UcsProfileResponse>();
for (UcsProfile p : profiles) {
UcsProfileResponse r = new UcsProfileResponse();
r.setObjectName("ucsprofile");
r.setDn(p.getDn());
rs.add(r);
}
response.setResponses(rs);
return response;
}
use of com.cloud.ucs.structure.UcsProfile in project cloudstack by apache.
the class UcsManagerImpl method getUcsProfiles.
private List<UcsProfile> getUcsProfiles(Long ucsMgrId) {
String cookie = getCookie(ucsMgrId);
UcsManagerVO mgrvo = ucsDao.findById(ucsMgrId);
String cmd = UcsCommands.listProfiles(cookie);
UcsHttpClient client = new UcsHttpClient(mgrvo.getUrl());
String res = client.call(cmd);
List<UcsProfile> profiles = UcsProfile.fromXmlString(res);
return profiles;
}
Aggregations