@Override public boolean apply(Template arg0) { return arg0.isPasswordEnabled(); }
@Override public boolean apply(Template arg0) { return arg0.isPasswordEnabled(); }
@Override public boolean apply(Template arg0) { return arg0.isPasswordEnabled(); }
@Test public void testCreateNodeWithGroupEncodedIntoName() { String group = prefix + "-foo"; String name = group + "-node-" + new Random().nextInt(); Template template = view.getComputeService().templateBuilder().build(); if (!client .getTemplateApi() .getTemplateInZone(template.getImage().getId(), template.getLocation().getId()).isPasswordEnabled()) { // TODO: look at SecurityGroupApiLiveTest for how to do this template.getOptions().as(CloudStackTemplateOptions.class).keyPair(keyPairName); } vm = adapter.createNodeWithGroupEncodedIntoName(group, name, template); assertEquals(vm.getNode().getDisplayName(), name); // check to see if we setup a NAT rule (conceding we could check this from // cache) IPForwardingRule rule = getFirst( client.getNATApi().getIPForwardingRulesForVirtualMachine(vm.getNode().getId()), null); String address = rule != null ? rule.getIPAddress() : vm.getNode().getIPAddress(); loginCredentials = prioritizeCredentialsFromTemplate.apply(template, vm.getCredentials()); assert InetAddresses.isInetAddress(address) : vm; HostAndPort socket = HostAndPort.fromParts(address, 22); checkSSH(socket); }
@Test public void testCreateNodeWithGroupEncodedIntoName() { String group = prefix + "-foo"; String name = group + "-node-" + new Random().nextInt(); Template template = view.getComputeService().templateBuilder().build(); if (!client .getTemplateClient() .getTemplateInZone(template.getImage().getId(), template.getLocation().getId()).isPasswordEnabled()) { // TODO: look at SecurityGroupClientLiveTest for how to do this template.getOptions().as(CloudStackTemplateOptions.class).keyPair(keyPairName); } vm = adapter.createNodeWithGroupEncodedIntoName(group, name, template); assertEquals(vm.getNode().getDisplayName(), name); // check to see if we setup a NAT rule (conceding we could check this from // cache) IPForwardingRule rule = getFirst( client.getNATClient().getIPForwardingRulesForVirtualMachine(vm.getNode().getId()), null); String address = rule != null ? rule.getIPAddress() : vm.getNode().getIPAddress(); loginCredentials = prioritizeCredentialsFromTemplate.apply(template, vm.getCredentials()); assert InetAddresses.isInetAddress(address) : vm; HostAndPort socket = HostAndPort.fromParts(address, 22); checkSSH(socket); }
.isPublic(in.ispublic()) .ready(in.isReady()) .passwordEnabled(in.isPasswordEnabled()) .jobId(in.getJobId()) .jobStatus(in.getJobStatus())
.isPublic(in.ispublic()) .ready(in.isReady()) .passwordEnabled(in.isPasswordEnabled()) .jobId(in.getJobId()) .jobStatus(in.getJobStatus())
.isPublic(in.ispublic()) .ready(in.isReady()) .passwordEnabled(in.isPasswordEnabled()) .jobId(in.getJobId()) .jobStatus(in.getJobStatus())