@Test public void testAttachElastiCacheSubnet() throws Throwable { executionStateCache.setElastiCacheClusterName("cacheCluster"); elastiCacheStepDefinitions.attachElastiCacheSubnet("subnet-1234"); }
@Then("^attach ElastiCache subnet \"([^\"]*)\"$") public ElastiCacheStepDefinitions attachElastiCacheSubnet(String subnetId) throws Throwable { String clusterName = executionStateCache.getElastiCacheClusterName(); if (clusterName == null || clusterName.isEmpty()) { throw new RuntimeException("Unable to reboot elastiCache cluster as no cluster information is available"); } elastiCacheRaider.attachSubnet(clusterName, subnetId); return this; }
ElastiCacheStepDefinitions { @Then("^attach ElastiCache subnet \"([^\"]*)\"$") public ElastiCacheStepDefinitions attachElastiCacheSubnet(String subnetId) throws Throwable { String clusterName = executionStateCache.getElastiCacheClusterName(); if (clusterName == null || clusterName.isEmpty()) { throw new RuntimeException("Unable to reboot elastiCache cluster as no cluster information is available"); } elastiCacheRaider.attachSubnet(clusterName, subnetId); return this; } }
ElastiCacheStepDefinitions { @Then("^attach ElastiCache subnet \"([^\"]*)\"$") public ElastiCacheStepDefinitions attachElastiCacheSubnet(String subnetId) throws Throwable { String clusterName = executionStateCache.getElastiCacheClusterName(); if (clusterName == null || clusterName.isEmpty()) { throw new RuntimeException("Unable to reboot elastiCache cluster as no cluster information is available"); } elastiCacheRaider.attachSubnet(clusterName, subnetId); return this; } ElastiCacheStepDefinitions(); }
ElastiCacheStepDefinitions { @Then("^attach ElastiCache subnet \"([^\"]*)\"$") public ElastiCacheStepDefinitions attachElastiCacheSubnet(String subnetId) throws Throwable { String clusterName = executionStateCache.getElastiCacheClusterName(); if (clusterName == null || clusterName.isEmpty()) { throw new RuntimeException("Unable to reboot elastiCache cluster as no cluster information is available"); } elastiCacheRaider.attachSubnet(clusterName, subnetId); return this; } ElastiCacheStepDefinitions(); ExecutionStateCache getExecutionStateCache(); void setExecutionStateCache(ExecutionStateCache executionStateCache); @Given("^ElastiCache \"([^\"]*)\"$") ElastiCacheStepDefinitions givenElastiCacheCluster(String elasticCacheClusterName); @When("^reboot ElastiCache nodes (\\d+)$") ElastiCacheStepDefinitions rebootElastiCacheCluster(int numNodes); @Then("^assertElastiCache cluster status \"([^\"]*)\"$") void assertElastiCacheClusterStatus(String expectedStatus); @When("^add ElastiCache nodes (\\d+)$") ElastiCacheStepDefinitions addElastiCacheNodes(int numNodes); @When("^remove ElastiCache nodes (\\d+)$") ElastiCacheStepDefinitions removeElastiCacheNodes(int numNodes); @When("^detach ElastiCache subnet \"([^\"]*)\"$") ElastiCacheStepDefinitions detachElastiCacheSubnet(String subnetId); @Then("^attach ElastiCache subnet \"([^\"]*)\"$") ElastiCacheStepDefinitions attachElastiCacheSubnet(String subnetId); @When("^change ElastiCache security group from \"([^\"]*)\" to \"([^\"]*)\"$") ElastiCacheStepDefinitions changeElastiCacheSecurityGroup(String secGroupFrom, String secGroupTo); @Given("^ElastiCache node \"([^\"]*)\"$") ElastiCacheStepDefinitions givenElastCacheNode(String nodeName); @When("^reboot ElastiCache node") ElastiCacheStepDefinitions rebootElastiCacheNode(); @Then("^assertElastiCache node status \"([^\"]*)\"$") void assertElastiCacheNodeStatus(String expectedStatus); }
ElastiCacheStepDefinitions { @Then("^attach ElastiCache subnet \"([^\"]*)\"$") public ElastiCacheStepDefinitions attachElastiCacheSubnet(String subnetId) throws Throwable { String clusterName = executionStateCache.getElastiCacheClusterName(); if (clusterName == null || clusterName.isEmpty()) { throw new RuntimeException("Unable to reboot elastiCache cluster as no cluster information is available"); } elastiCacheRaider.attachSubnet(clusterName, subnetId); return this; } ElastiCacheStepDefinitions(); ExecutionStateCache getExecutionStateCache(); void setExecutionStateCache(ExecutionStateCache executionStateCache); @Given("^ElastiCache \"([^\"]*)\"$") ElastiCacheStepDefinitions givenElastiCacheCluster(String elasticCacheClusterName); @When("^reboot ElastiCache nodes (\\d+)$") ElastiCacheStepDefinitions rebootElastiCacheCluster(int numNodes); @Then("^assertElastiCache cluster status \"([^\"]*)\"$") void assertElastiCacheClusterStatus(String expectedStatus); @When("^add ElastiCache nodes (\\d+)$") ElastiCacheStepDefinitions addElastiCacheNodes(int numNodes); @When("^remove ElastiCache nodes (\\d+)$") ElastiCacheStepDefinitions removeElastiCacheNodes(int numNodes); @When("^detach ElastiCache subnet \"([^\"]*)\"$") ElastiCacheStepDefinitions detachElastiCacheSubnet(String subnetId); @Then("^attach ElastiCache subnet \"([^\"]*)\"$") ElastiCacheStepDefinitions attachElastiCacheSubnet(String subnetId); @When("^change ElastiCache security group from \"([^\"]*)\" to \"([^\"]*)\"$") ElastiCacheStepDefinitions changeElastiCacheSecurityGroup(String secGroupFrom, String secGroupTo); @Given("^ElastiCache node \"([^\"]*)\"$") ElastiCacheStepDefinitions givenElastCacheNode(String nodeName); @When("^reboot ElastiCache node") ElastiCacheStepDefinitions rebootElastiCacheNode(); @Then("^assertElastiCache node status \"([^\"]*)\"$") void assertElastiCacheNodeStatus(String expectedStatus);  }