Search in sources :

Example 1 with OpenstackSlaveTemplate

use of org.jenkinsci.test.acceptance.plugins.openstack.OpenstackSlaveTemplate in project acceptance-test-harness by jenkinsci.

the class OpenstackCloudPluginTest method configureProvisioning.

private void configureProvisioning(String type, String labels) {
    jenkins.configure();
    OpenstackCloud cloud = addCloud(jenkins.getConfigPage()).associateFloatingIp(FIP_POOL_NAME);
    cloud.instanceCap(3);
    OpenstackSlaveTemplate template = cloud.addSlaveTemplate();
    template.name(CLOUD_DEFAULT_TEMPLATE);
    template.labels(labels);
    template.hardwareId(HARDWARE_ID);
    template.networkId(NETWORK_ID);
    template.imageId(IMAGE_ID);
    template.credentials(MACHINE_USERNAME);
    template.slaveType(type);
    template.userData(CLOUD_INIT_NAME);
    template.keyPair(KEY_PAIR_NAME);
    template.fsRoot("/tmp/jenkins");
    jenkins.save();
}
Also used : OpenstackCloud(org.jenkinsci.test.acceptance.plugins.openstack.OpenstackCloud) OpenstackSlaveTemplate(org.jenkinsci.test.acceptance.plugins.openstack.OpenstackSlaveTemplate)

Aggregations

OpenstackCloud (org.jenkinsci.test.acceptance.plugins.openstack.OpenstackCloud)1 OpenstackSlaveTemplate (org.jenkinsci.test.acceptance.plugins.openstack.OpenstackSlaveTemplate)1