Search in sources :

Example 1 with UcsProfileResponse

use of org.apache.cloudstack.api.response.UcsProfileResponse 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;
}
Also used : UcsProfile(com.cloud.ucs.structure.UcsProfile) ListResponse(org.apache.cloudstack.api.response.ListResponse) ArrayList(java.util.ArrayList) UcsProfileResponse(org.apache.cloudstack.api.response.UcsProfileResponse)

Aggregations

UcsProfile (com.cloud.ucs.structure.UcsProfile)1 ArrayList (java.util.ArrayList)1 ListResponse (org.apache.cloudstack.api.response.ListResponse)1 UcsProfileResponse (org.apache.cloudstack.api.response.UcsProfileResponse)1