public function testNodeFindByUUID() { $node = Client::getInstance()->nodes()->find("3cb9e362-d4ef-4e4b-9ee6-280738b53172"); $this->putExpectation("Nodes/FindByUUID", $node); $this->assertEquals($this->getExpectation("Nodes/FindByUUID"), $node); return $node; }
public function setUp() { parent::setUp(); VCR::turnOn(); $calledClass = explode("\\", get_called_class()); $cassette = end($calledClass) . "/" . $this->getName(); VCR::insertCassette($cassette); $this->apiClient = Client::getInstance(); }
public function testRelatedObjects() { $webservice = Client::getInstance()->services()->find('6fe506a6-a85c-4bcf-9398-f1429657f4df'); $mysqlService = Client::getInstance()->services()->find('4f07a3fa-5101-43c4-a973-a23571e88a53'); $loadBalancerService = Client::getInstance()->services()->find('7a613296-e861-47c7-98c5-05f75b760bcf'); $this->assertContainsOnlyInstancesOf("\\Thru\\TutumApi\\Models\\Container", $webservice->getContainers()); $this->assertContainsOnlyInstancesOf("\\Thru\\TutumApi\\Models\\Service", $webservice->getLinkedFromService()); $this->assertContainsOnlyInstancesOf("\\Thru\\TutumApi\\Models\\Service", $mysqlService->getLinkedToService()); $this->assertContainsOnlyInstancesOf("\\Thru\\TutumApi\\Models\\Service", $loadBalancerService->getLinkedToExternalService()); $this->assertContainsOnlyInstancesOf("\\Thru\\TutumApi\\Models\\Port", $webservice->getContainerPorts()); }
public function testContainerFindByName() { $container = Client::getInstance()->containers()->findByName("MySQL-1"); $this->putExpectation("Containers/FindByName", $container); $this->assertEquals($this->getExpectation("Containers/FindByName"), $container); }
public function redeploy() { return Client::getInstance()->stacks()->redeploy($this->getUuid()); }
public function reload() { Client::getInstance()->stacks()->find($this->getUuid(), $this); }
public function reload() { if ($this->getUuid()) { Client::getInstance()->services()->find($this->getUuid(), $this); } }
public function testStackFindByName() { $stack = Client::getInstance()->stacks()->findByName("Thruio"); #$this->putExpectation("Stack/FindByName", $stack); $this->assertEquals($this->getExpectation("Stack/FindByName"), $stack); }
/** * @return Service * @throws \Exception */ public function terminate() { $service = Client::getInstance()->services()->terminateService($this->getUuid()); return $service; }
public function testServiceServices() { $service = Client::getInstance()->services()->findByName("MySQL"); $this->assertTrue($service instanceof Models\Service); }
public function testPropertiesWork() { $stack = Client::getInstance()->stacks()->findByName("Thruio"); $this->assertEquals("Thruio", $stack->getName()); $this->assertEquals("7734bf20-a765-47a1-82e6-019e885dc327", $stack->getUuid()); }