use of com.att.cdp.zones.Context in project AJSC by att.
the class DummyIdentity method getTenant.
/**
* @see com.att.cdp.zones.Service#getTenant()
*/
@Override
public Tenant getTenant() throws ZoneException {
checkLoggedIn();
Context context = getContext();
return ((DummyProviderContext) context).getTenant();
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class ConnectedHypervisor method refreshStatus.
/**
* @see com.att.cdp.zones.model.Hypervisor#refreshStatus()
*/
@Override
public void refreshStatus() throws ZoneException {
Context context = getContext();
context.getComputeService().refreshHypervisorStatus(this);
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class ConnectedImage method refreshAll.
/**
* @see com.att.cdp.zones.model.Image#refreshAll()
*/
@Override
public void refreshAll() throws ZoneException {
Context context = getContext();
Image copy = context.getImageService().getImage(getId());
ObjectMapper.map(copy, this);
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class ConnectedServer method assignIpAddressFromPool.
/**
* @see com.att.cdp.zones.model.Server#assignIpAddressFromPool()
*/
@Override
public String assignIpAddressFromPool() throws ZoneException {
Context context = getContext();
List<String> pools = context.getNetworkService().getFloatingIpPools();
if (pools == null || pools.isEmpty()) {
throw new InvalidRequestException(EELFResourceManager.format(Msg.NO_FLOATING_IP_POOL));
}
return assignIpAddressFromPool(pools.get(0));
}
use of com.att.cdp.zones.Context in project AJSC by att.
the class ConnectedServer method suspend.
/**
* @see com.att.cdp.zones.model.Server#suspend()
*/
@Override
public void suspend() throws ZoneException {
Context context = getContext();
context.getComputeService().suspendServer(this);
}
Aggregations