Package com.axemblr.provisionr.api.pool

Examples of com.axemblr.provisionr.api.pool.Pool


            .publicKey(getResourceAsString("keys/test.pub"))
            .privateKey(getResourceAsString("keys/test"))
            .createAdminAccess();

        DelegateExecution execution = mock(DelegateExecution.class);
        Pool pool = mock(Pool.class);

        when(pool.getProvider()).thenReturn(provider);
        when(pool.getAdminAccess()).thenReturn(adminAccess);

        when(execution.getProcessBusinessKey()).thenReturn(BUSINESS_KEY);
        when(execution.getVariable(CoreProcessVariables.POOL)).thenReturn(pool);

        activity.execute(execution);
View Full Code Here


        Software software = Software.builder()
            .file("http://bin.axemblr.com/test.tar.gz", "/opt/test.tar.gz")
            .file("http://google.com", "/opt/google.html")
            .createSoftware();

        Pool pool = mock(Pool.class);
        when(pool.getSoftware()).thenReturn(software);

        PuppetActivity activity = new DownloadFiles();
        String content = activity.createPuppetScript(pool, null);

        assertThat(content)
View Full Code Here

public class InstallPackagesTest {

    @Test
    public void testCreatePuppetScript() throws Exception {
        Pool pool = mock(Pool.class);
        when(pool.getSoftware()).thenReturn(Software.builder()
            .packages("git-core", "vim").createSoftware());

        PuppetActivity activity = new InstallPackages();
        String content = activity.createPuppetScript(pool, null);
View Full Code Here

                "Version: GnuPG v1.4.10 (GNU/Linux)\n" +
                "\n" +
                "[....]")
            .createRepository();

        Pool pool = mock(Pool.class);
        when(pool.getSoftware()).thenReturn(Software.builder().repository(repository).createSoftware());

        PuppetActivity activity = new InstallRepositories();
        String content = activity.createPuppetScript(pool, null);

        assertThat(content).contains("apt::repository { \"bigtop\":\n" +
View Full Code Here

            .createSoftware();

        PoolTemplate jenkins = XmlTemplate.newXmlTemplate(Resources.toString(Resources
            .getResource(PoolTemplate.class, DEFAULT_JENKINS_TEMPLATE_PATH), Charsets.UTF_8));

        final Pool pool = jenkins.apply(Pool.builder()
            .provider(provider)
            .network(network)
            .adminAccess(adminAccess)
            .software(software)
            .hardware(hardware)
View Full Code Here

    }

    @Test
    public void testDeleteSecurityGroup() throws Exception {
        DelegateExecution execution = mock(DelegateExecution.class);
        Pool pool = mock(Pool.class);

        when(pool.getProvider()).thenReturn(provider);
        when(execution.getVariable(CoreProcessVariables.POOL)).thenReturn(pool);
        when(execution.getProcessBusinessKey()).thenReturn(BUSINESS_KEY);

        client.createSecurityGroup(new CreateSecurityGroupRequest()
            .withGroupName(SECURITY_GROUP_NAME).withDescription("Just for test"));
View Full Code Here

    @Override
    public void execute(DelegateExecution execution) throws Exception {

        RestContext<CloudStackClient, CloudStackAsyncClient> restContext = null;
        try {
            Pool pool = Pool.class.cast(checkNotNull(execution.getVariable(CoreProcessVariables.POOL),
                "Please add 'pool' variable to the process"));
            // delegate
            restContext = newCloudStackClient(pool.getProvider());
            execute(restContext.getApi(), pool, execution);

        } finally {
            Closeables.closeQuietly(restContext);
        }
View Full Code Here

TOP

Related Classes of com.axemblr.provisionr.api.pool.Pool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.