Search in sources :

Example 16 with Port

use of com.att.cdp.zones.model.Port in project AJSC by att.

the class ConnectedServer method getPorts.

/**
 * Override the API class to actually get and return the list of ports from the service provider and to cache them
 * once obtained.
 *
 * @see com.att.cdp.zones.model.Server#getPorts()
 */
@Override
public List<Port> getPorts() throws ZoneException {
    Context context = getContext();
    ComputeService service = context.getComputeService();
    List<Port> ports = service.getPorts(this);
    if (ports == null) {
        ports = new ArrayList<Port>();
    }
    return ports;
}
Also used : Context(com.att.cdp.zones.Context) Port(com.att.cdp.zones.model.Port) ComputeService(com.att.cdp.zones.ComputeService)

Aggregations

Port (com.att.cdp.zones.model.Port)16 Context (com.att.cdp.zones.Context)12 OpenStackPort (com.att.cdp.openstack.model.OpenStackPort)8 NetworkService (com.att.cdp.zones.NetworkService)8 Ignore (org.junit.Ignore)7 Test (org.junit.Test)7 Server (com.att.cdp.zones.model.Server)6 OpenStackBaseException (com.woorea.openstack.base.client.OpenStackBaseException)6 Subnet (com.att.cdp.zones.model.Subnet)5 ArrayList (java.util.ArrayList)5 ZoneException (com.att.cdp.exceptions.ZoneException)4 OpenStackContext (com.att.cdp.openstack.OpenStackContext)4 OpenStackServer (com.att.cdp.openstack.model.OpenStackServer)4 ComputeService (com.att.cdp.zones.ComputeService)4 ConnectedServer (com.att.cdp.zones.spi.model.ConnectedServer)4 InterfaceAttachment (com.woorea.openstack.nova.model.InterfaceAttachment)3 InterfaceAttachments (com.woorea.openstack.nova.model.InterfaceAttachments)3 OpenStackACL (com.att.cdp.openstack.model.OpenStackACL)2 OpenStackFault (com.att.cdp.openstack.model.OpenStackFault)2 ACL (com.att.cdp.zones.model.ACL)2