LibCloud\Compute\Providers\Rackspace\RackspaceProvider::resizeNode PHP Method

resizeNode() public method

public resizeNode ( Node $node, NodeSize $nodeSize ) : Guzzle\Http\Message\Response
$node LibCloud\Compute\Model\Node
$nodeSize LibCloud\Compute\Model\NodeSize
return Guzzle\Http\Message\Response
    public function resizeNode(Node $node, NodeSize $nodeSize)
    {
        return $this->toServer($node)->resize($this->toFlavor($nodeSize));
    }

Usage Example

 /**
  * @depends testListNodesWithId
  * @depends testListSizes
  */
 public function testResizeNode($node, $sizes)
 {
     $this->addMockSubscriber($this->getTestFilePath('Server'));
     $this->addMockSubscriber($this->getTestFilePath('Server_Meta'));
     $this->addMockSubscriber($this->getTestFilePath('Flavor_ForResize'));
     $this->addMockSubscriber($this->getTestFilePath('Server_Resize'));
     $r = $this->provider->resizeNode($node, $sizes[1]);
     $this->assertSame(202, $r->getStatusCode(), 'resizeNode returns the API response for the successful initiation of a resize operation');
 }