use of com.att.cdp.zones.Context in project AJSC by att.
the class ConnectedServer method releaseIpAddress.
/**
* @see com.att.cdp.zones.model.Server#releaseIpAddress(java.lang.String)
*/
@Override
public void releaseIpAddress(String address) throws ZoneException {
Context context = getContext();
context.getComputeService().releaseIpAddress(this, address);
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class ConnectedServer method getFixedIpsViaInterfaces.
/**
* @see com.att.cdp.zones.model.Server#getFixedIpsViaInterfaces()
*/
@Override
public List<String> getFixedIpsViaInterfaces() throws ZoneException {
Context context = getContext();
List<String> ipAddrList = null;
List<com.att.cdp.zones.model.Port> ports = context.getNetworkService().getInterfaces(getId());
if (ports != null && ports.size() > 0) {
LOG.info("getFixedIpViaInterfaces(): ports={}", ports);
ipAddrList = ports.get(0).getAddresses();
} else {
LOG.warn("getFixedIpViaInterfaces(): No ports found!");
}
return ipAddrList;
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class ConnectedServer method assignIp.
/**
* @see com.att.cdp.zones.model.Server#assignIp(java.lang.String)
*/
@Override
public void assignIp(String address) throws ZoneException {
Context context = getContext();
context.getComputeService().assignIpAddress(this, address);
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class ConnectedVolume method refresh.
/**
* @see com.att.cdp.zones.model.Volume#refresh()
*/
@Override
public void refresh() throws ZoneException {
Context context = getContext();
Volume copy = context.getVolumeService().getVolume(getId());
ObjectMapper.map(copy, this);
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class AbstractVolume method getVolumes.
/**
* This is a default implementation that is correct for all providers other than VMware. The VMware provider
* overrides this method. Any other providers that want to implement this method may also override it if needed.
*
* getVolumes methods gives a list of volumes for a particular model
*/
@Override
public List<Volume> getVolumes(Server server) throws ZoneException {
Context context = getContext();
Provider provider = context.getProvider();
throw new NotSupportedException(String.format("Provider %s does not support getVolumebyServer Id using a model", provider.getName()));
}
Aggregations