Search in sources :

Example 1 with AwsCanaryAccount

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;
}
Also used : AwsCanaryAccount(com.netflix.spinnaker.halyard.config.model.v1.canary.aws.AwsCanaryAccount) AwsCanaryServiceIntegration(com.netflix.spinnaker.halyard.config.model.v1.canary.aws.AwsCanaryServiceIntegration)

Aggregations

AwsCanaryAccount (com.netflix.spinnaker.halyard.config.model.v1.canary.aws.AwsCanaryAccount)1 AwsCanaryServiceIntegration (com.netflix.spinnaker.halyard.config.model.v1.canary.aws.AwsCanaryServiceIntegration)1