コード例 #1
0
ファイル: Service.php プロジェクト: omusico/home365
 /**
  * Called when creating a new Compute service object
  *
  * _NOTE_ that the order of parameters for this is *different* from the
  * parent Service class. This is because the earlier parameters are the
  * ones that most typically change, whereas the later ones are not
  * modified as often.
  *
  * @param \OpenCloud\Identity $conn - a connection object
  * @param string $serviceRegion - identifies the region of this Compute
  *      service
  * @param string $urltype - identifies the URL type ("publicURL",
  *      "privateURL")
  * @param string $serviceName - identifies the name of the service in the
  *      catalog
  */
 public function __construct(OpenStack $conn, $serviceName, $serviceRegion, $urltype)
 {
     $this->debug(Lang::translate('initializing Compute...'));
     parent::__construct($conn, 'compute', $serviceName, $serviceRegion, $urltype);
     // check the URL version
     $path = parse_url($this->Url(), PHP_URL_PATH);
     if (substr($path, 0, 3) == '/v1') {
         throw new Exceptions\UnsupportedVersionError(sprintf(Lang::translate('Sorry; API version /v1 is not supported [%s]'), $this->Url()));
     }
     $this->load_namespaces();
 }
コード例 #2
0
ファイル: Service.php プロジェクト: BulatSa/Ctex
 /**
  * Creates a new DbService service connection
  *
  * This is not normally called directly, but via the factory method on the
  * OpenStack or Rackspace connection object.
  *
  * @param OpenStack $conn the connection on which to create the service
  * @param string $name the name of the service (e.g., "cloudDatabases")
  * @param string $region the region of the service (e.g., "DFW" or "LON")
  * @param string $urltype the type of URL (normally "publicURL")
  */
 public function __construct(OpenStack $conn, $name, $region, $urltype)
 {
     parent::__construct($conn, 'rax:database', $name, $region, $urltype);
 }
コード例 #3
0
ファイル: Service.php プロジェクト: BulatSa/Ctex
 /**
  * Creates a new LoadBalancerService connection
  *
  * This is not normally called directly, but via the factory method on the
  * OpenStack or Rackspace connection object.
  *
  * @param OpenStack $conn the connection on which to create the service
  * @param string $name the name of the service (e.g., "cloudDatabases")
  * @param string $region the region of the service (e.g., "DFW" or "LON")
  * @param string $urltype the type of URL (normally "publicURL")
  */
 public function __construct(OpenStack $conn, $name, $region, $urltype)
 {
     parent::__construct($conn, self::SERVICE_TYPE, $name, $region, $urltype);
 }
コード例 #4
0
ファイル: Service.php プロジェクト: artlabsdesign/missbloom
 /**
  * creates the VolumeService object
  */
 public function __construct(OpenStack $connection, $name, $region, $urltype)
 {
     parent::__construct($connection, 'volume', $name, $region, $urltype);
 }