aboutsummaryrefslogtreecommitdiffstats
path: root/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/aws/MockEnclaveAccessService.java
blob: 1cfc05bba7eab86acdba2937b178b4800452e46b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.yahoo.vespa.hosted.controller.api.integration.aws;

import com.yahoo.config.provision.CloudAccount;

import java.util.Set;
import java.util.TreeSet;

/**
 * @author jonmv
 */
public class MockEnclaveAccessService implements EnclaveAccessService {

    private volatile Set<CloudAccount> currentAccounts = new TreeSet<>();

    public Set<CloudAccount> currentAccounts() { return currentAccounts; }

    @Override
    public double allowAccessFor(Set<CloudAccount> accounts) {
        currentAccounts = new TreeSet<>(accounts);
        return 1;
    }

}