示例#1
0
文件: Node.php 项目: Thruio/TutumApi
 public function getNodeFromResponse($response, Models\Node $node = null)
 {
     if ($node === null) {
         $node = new Models\Node();
     }
     $node->setAvailabilityZone($response->availability_zone);
     $node->setCpu($response->cpu);
     $node->setCurrentNumContainers($response->current_num_containers);
     $node->setDeployedDatetime($response->deployed_datetime);
     $node->setDestroyedDatetime($response->destroyed_datetime);
     $node->setDisk($response->disk);
     $node->setDockerExecdriver($response->docker_execdriver);
     $node->setDockerGraphdriver($response->docker_graphdriver);
     $node->setDockerVersion($response->docker_version);
     $node->setExternalFqdn($response->external_fqdn);
     $node->setLastMetric($response->last_metric);
     $node->setLastSeen($response->last_seen);
     $node->setMemory($response->memory);
     $node->setNodeCluster($response->node_cluster);
     $node->setNodeType($response->node_type);
     $node->setPublicIp($response->public_ip);
     $node->setRegion($response->region);
     $node->setResourceUri($response->resource_uri);
     $node->setState($response->state);
     $node->setTags($response->tags);
     $node->setTunnel($response->tunnel);
     $node->setUuid($response->uuid);
     return $node;
 }