use of com.vmware.xenon.common.ServiceDocument in project photon-model by vmware.
the class SecurityGroupService method getDocumentTemplate.
@Override
public ServiceDocument getDocumentTemplate() {
ServiceDocument td = super.getDocumentTemplate();
// enable metadata indexing
td.documentDescription.documentIndexingOptions = EnumSet.of(DocumentIndexingOption.INDEX_METADATA);
ServiceUtils.setRetentionLimit(td);
SecurityGroupState template = (SecurityGroupState) td;
template.id = UUID.randomUUID().toString();
template.name = "security-group-one";
return template;
}
use of com.vmware.xenon.common.ServiceDocument in project photon-model by vmware.
the class StorageDescriptionService method getDocumentTemplate.
@Override
public ServiceDocument getDocumentTemplate() {
ServiceDocument template = super.getDocumentTemplate();
// enable metadata indexing
template.documentDescription.documentIndexingOptions = EnumSet.of(DocumentIndexingOption.INDEX_METADATA);
ServiceUtils.setRetentionLimit(template);
return template;
}
use of com.vmware.xenon.common.ServiceDocument in project photon-model by vmware.
the class SubnetService method getDocumentTemplate.
@Override
public ServiceDocument getDocumentTemplate() {
ServiceDocument td = super.getDocumentTemplate();
// enable metadata indexing
td.documentDescription.documentIndexingOptions = EnumSet.of(DocumentIndexingOption.INDEX_METADATA);
ServiceUtils.setRetentionLimit(td);
SubnetState template = (SubnetState) td;
template.id = UUID.randomUUID().toString();
template.subnetCIDR = "10.1.0.0/16";
template.name = "sub-network";
template.networkLink = UriUtils.buildUriPath(NetworkService.FACTORY_LINK, "on-prem-network");
template.dnsServerAddresses = new ArrayList<>();
template.dnsServerAddresses.add("10.12.14.12");
template.gatewayAddress = "10.1.0.1";
template.supportPublicIpAddress = Boolean.TRUE;
template.defaultForZone = Boolean.TRUE;
return template;
}
use of com.vmware.xenon.common.ServiceDocument in project photon-model by vmware.
the class NetworkInterfaceDescriptionService method getDocumentTemplate.
@Override
public ServiceDocument getDocumentTemplate() {
ServiceDocument td = super.getDocumentTemplate();
// enable metadata indexing
td.documentDescription.documentIndexingOptions = EnumSet.of(DocumentIndexingOption.INDEX_METADATA);
ServiceUtils.setRetentionLimit(td);
NetworkInterfaceDescription template = (NetworkInterfaceDescription) td;
template.id = UUID.randomUUID().toString();
template.name = "my-nic";
template.subnetLink = UriUtils.buildUriPath(SubnetService.FACTORY_LINK, "sub-network");
template.assignment = IpAssignment.STATIC;
template.address = "10.1.0.12";
template.securityGroupLinks = Collections.singletonList(UriUtils.buildUriPath(SecurityGroupService.FACTORY_LINK, "security-group-one"));
template.deviceIndex = 0;
template.assignPublicIpAddress = Boolean.TRUE;
return template;
}
use of com.vmware.xenon.common.ServiceDocument in project photon-model by vmware.
the class NetworkService method getDocumentTemplate.
@Override
public ServiceDocument getDocumentTemplate() {
ServiceDocument td = super.getDocumentTemplate();
// enable metadata indexing
td.documentDescription.documentIndexingOptions = EnumSet.of(DocumentIndexingOption.INDEX_METADATA);
ServiceUtils.setRetentionLimit(td);
NetworkState template = (NetworkState) td;
template.id = UUID.randomUUID().toString();
template.subnetCIDR = "10.1.0.0/16";
template.name = "cell-network";
return template;
}
Aggregations