Ejemplo n.º 1
0
 public function __construct(Client $client, $type = null, $name = null, $region = null, $urlType = null)
 {
     parent::__construct($client, $type, $name, $region, $urlType);
     try {
         $this->cdnService = ServiceBuilder::factory($client, 'OpenCloud\\ObjectStore\\CDNService', array('region' => $region));
     } catch (Exceptions\EndpointError $e) {
     }
 }
Ejemplo n.º 2
0
 /**
  * Creates a new Networking (Neutron) service object
  *
  * @param string $name    The name of the service as it appears in the Catalog
  * @param string $region  The region (DFW, IAD, ORD, LON, SYD)
  * @param string $urltype The URL type ("publicURL" or "internalURL")
  * @return \OpenCloud\Networking\Service
  * @codeCoverageIgnore
  */
 public function networkingService($name = null, $region = null, $urltype = null)
 {
     return ServiceBuilder::factory($this, 'OpenCloud\\Networking\\Service', array('name' => $name, 'region' => $region, 'urlType' => $urltype));
 }
Ejemplo n.º 3
0
 public function test_Region_ServiceBuilder()
 {
     $dfwService = ServiceBuilder::factory($this->getClient(), 'OpenCloud\\Compute\\Service', array('name' => 'cloudServersOpenStack', 'region' => 'DFW', 'urltype' => 'publicURL'));
     $this->assertEquals('DFW', $dfwService->getEndpoint()->getRegion());
     $dfwService2 = $this->getClient()->computeService('cloudServersOpenStack', 'SYD');
     $this->assertEquals('SYD', $dfwService2->getEndpoint()->getREgion());
 }
Ejemplo n.º 4
0
 /**
  * Creates a new CDN (Rackspace CDN) service object
  *
  * @param string $name    The name of the service as it appears in the Catalog
  * @param string $region  The region (DFW, IAD, ORD, LON, SYD)
  * @param string $urltype The URL type ("publicURL" or "internalURL")
  * @return \OpenCloud\Cdn\Service
  * @codeCoverageIgnore
  */
 public function cdnService($name = null, $region = null, $urltype = null)
 {
     return ServiceBuilder::factory($this, 'OpenCloud\\CDN\\Service', array('name' => $name, 'type' => 'rax:cdn', 'region' => $region, 'urlType' => $urltype));
 }