use of org.hl7.fhir.dstu3.model.Address in project gpconnect-demonstrator by nhsconnect.
the class StaticElementsHelper method getValidAddress.
public Address getValidAddress() {
Address orgAddress = new Address();
orgAddress.setType(AddressType.PHYSICAL);
orgAddress.setUse(AddressUse.WORK);
return orgAddress;
}
use of org.hl7.fhir.dstu3.model.Address in project gpconnect-demonstrator by nhsconnect.
the class OrganizationResourceProvider method getValidAddress.
private Address getValidAddress() {
Address orgAddress = new Address();
orgAddress.setType(AddressType.PHYSICAL);
orgAddress.setUse(AddressUse.WORK);
return orgAddress;
}
use of org.hl7.fhir.dstu3.model.Address in project cloudbreak by hortonworks.
the class AwsResourceConnector method releaseReservedIp.
private void releaseReservedIp(AmazonEC2 client, Iterable<CloudResource> resources) {
CloudResource elasticIpResource = getReservedIp(resources);
if (elasticIpResource != null && elasticIpResource.getName() != null) {
Address address;
try {
DescribeAddressesResult describeResult = client.describeAddresses(new DescribeAddressesRequest().withAllocationIds(elasticIpResource.getName()));
address = describeResult.getAddresses().get(0);
} catch (AmazonServiceException e) {
if (e.getErrorMessage().equals("The allocation ID '" + elasticIpResource.getName() + "' does not exist")) {
LOGGER.warn("Elastic IP with allocation ID '{}' not found. Ignoring IP release.", elasticIpResource.getName());
return;
} else {
throw e;
}
}
if (address.getAssociationId() != null) {
client.disassociateAddress(new DisassociateAddressRequest().withAssociationId(elasticIpResource.getName()));
}
client.releaseAddress(new ReleaseAddressRequest().withAllocationId(elasticIpResource.getName()));
}
}
Aggregations