Search in sources :

Example 1 with CommonIPPortDefinition

use of iControl.CommonIPPortDefinition in project cloudstack by apache.

the class F5BigIpResource method getMembers.

private List<String> getMembers(String virtualServerName) throws ExecutionException {
    try {
        List<String> members = new ArrayList<String>();
        String[] virtualServerNames = genStringArray(virtualServerName);
        CommonIPPortDefinition[] membersArray = _loadbalancerApi.get_member(virtualServerNames)[0];
        for (CommonIPPortDefinition member : membersArray) {
            members.add(member.getAddress() + "-" + member.getPort());
        }
        return members;
    } catch (RemoteException e) {
        throw new ExecutionException(e.getMessage());
    }
}
Also used : CommonIPPortDefinition(iControl.CommonIPPortDefinition) ArrayList(java.util.ArrayList) RemoteException(java.rmi.RemoteException) ExecutionException(com.cloud.utils.exception.ExecutionException)

Aggregations

ExecutionException (com.cloud.utils.exception.ExecutionException)1 CommonIPPortDefinition (iControl.CommonIPPortDefinition)1 RemoteException (java.rmi.RemoteException)1 ArrayList (java.util.ArrayList)1