public Profile[] getProfile() { ManagedObjectReference[] mors = (ManagedObjectReference[])getCurrentProperty("profile"); return convert2Profiles(mors); }
public ProfilePolicyMetadata[] queryPolicyMetadata(String[] policyName) throws RuntimeFault, RemoteException { return queryPolicyMetadata(policyName, null); }
public Profile createProfile(ProfileCreateSpec createSpec) throws DuplicateName, RuntimeFault, RemoteException { ManagedObjectReference profileMor = getVimService().createProfile(getMOR(), createSpec); return new Profile(getServerConnection(), profileMor); }
public Profile[] findAssociatedProfile(ManagedEntity entity) throws RuntimeFault, RemoteException { ManagedObjectReference[] mors = getVimService().findAssociatedProfile(getMOR(), entity.getMOR()); return convert2Profiles(mors); }
public ProfilePolicyMetadata[] queryPolicyMetadata(String[] policyName, Profile profile) throws RuntimeFault, RemoteException { return getVimService().queryPolicyMetadata(getMOR(), policyName, profile==null? null : profile.getMOR()); }
private Profile[] convert2Profiles(ManagedObjectReference[] mors) { Profile[] pfs = new Profile[mors.length]; for(int i=0; i<mors.length; i++) { pfs[i] = new Profile(getServerConnection(), mors[i]); } return pfs; }