use of com.netflix.spinnaker.halyard.config.model.v1.canary.aws.AwsCanaryAccount in project halyard by spinnaker.
the class AwsAddCanaryAccountCommand method buildAccount.
@Override
protected AbstractCanaryAccount buildAccount(Canary canary, String accountName) {
AwsCanaryAccount account = (AwsCanaryAccount) new AwsCanaryAccount().setName(accountName);
account.setBucket(bucket);
account.setRootFolder(isSet(rootFolder) ? rootFolder : account.getRootFolder());
AwsCanaryServiceIntegration awsCanaryServiceIntegration = (AwsCanaryServiceIntegration) CanaryUtils.getServiceIntegrationByClass(canary, AwsCanaryServiceIntegration.class);
if (awsCanaryServiceIntegration.isS3Enabled()) {
account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.CONFIGURATION_STORE);
account.getSupportedTypes().add(AbstractCanaryServiceIntegration.SupportedTypes.OBJECT_STORE);
}
return account;
}
Aggregations