コード例 #1
0
 public function createDomain($domainName)
 {
     $openshift = ObjectBroker::get("openshift");
     $dispatcher = $openshift->getDispatcher();
     $url = "https://openshift.redhat.com/broker/rest/domains";
     $params = array("id" => $domainName);
     $data = $dispatcher->post($url, $params);
     return $data;
 }
コード例 #2
0
 public function __construct($username, $password)
 {
     if (!$this->auth) {
         $this->auth = new Auth($username, $password);
         $this->dispatcher = new Dispatcher($this->auth);
         ObjectBroker::register("openshift", $this);
         ObjectBroker::register("auth", $this->auth);
         ObjectBroker::register("dispatcher", $this->dispatcher);
         return $this;
         //for method chaining
     }
 }
コード例 #3
0
 /**
  * Valid Cartridge Names Are
  * [0] => nodejs-0.6
  * [1] => zend-5.6
  * [2] => ruby-1.9
  * [3] => jbossas-7
  * [4] => python-2.6
  * [5] => jenkins-1.4
  * [6] => ruby-1.8
  * [7] => jbosseap-6.0
  * [8] => diy-0.1
  * [9] => jbossews-1.0
  * [10] => php-5.3
  * [11] => perl-5.10
  */
 public function createApplication($name, $cartridge, $initialGitRepoUrl = "", $scale = false, $gearProfile = "small")
 {
     $openshift = ObjectBroker::get("openshift");
     $dispatcher = $openshift->getDispatcher();
     $url = "https://openshift.redhat.com/broker/rest/domains/{$this->domainName}/applications";
     $params = array("name" => $name, "cartridge" => $cartridge, "scale" => $scale, "gear_profile" => $gearProfile, "init_git_url" => $initialGitRepoUrl);
     $data = $dispatcher->post($url, $params);
     return $data;
 }
コード例 #4
0
ファイル: App.php プロジェクト: roomify/openshift-php-client
 public function resolveDns()
 {
     $openshift = ObjectBroker::get("openshift");
     $dispatcher = $openshift->getDispatcher();
     $url = "https://openshift.redhat.com/broker/rest/domains/{$this->domainId}/applications/{$this->appName}/dns_resolvable";
     $data = $dispatcher->get($url);
     return $data;
 }