@Before public void setUp() { Properties prop = new Properties(); prop.put(Constants.PROPERTY_ENDPOINT, TestConstants.ENDPOINT); ContextBuilder builder = ContextBuilder.newBuilder(TestConstants.PROVIDER) .credentials(TestConstants.API_KEY, TestConstants.SECRET_KEY) // .modules(modules) .overrides(prop); CloudStackContext context = builder.buildView(CloudStackContext.class); RestContext<CloudStackClient, CloudStackAsyncClient> providerContext = context.getProviderSpecificContext(); client = providerContext.getApi(); }
@Override protected GlobalPodClient clientFrom(CloudStackContext context) { return context.getGlobalContext().getApi().getPodClient(); }
@Override protected GlobalZoneApi clientFrom(CloudStackContext context) { return context.getGlobalApi().getZoneApi(); }