Exemplo n.º 1
0
 function __construct()
 {
     parent::__construct('NovaDomain');
     global $wgOpenStackManagerNovaAdminKeys;
     $this->userLDAP = new OpenStackNovaUser();
     $this->adminNova = new OpenStackNovaController($wgOpenStackManagerNovaAdminKeys);
 }
Exemplo n.º 2
0
 function __construct()
 {
     parent::__construct('NovaRole', 'manageproject');
     global $wgOpenStackManagerNovaAdminKeys;
     $this->userLDAP = new OpenStackNovaUser();
     $adminCredentials = $wgOpenStackManagerNovaAdminKeys;
     $this->adminNova = new OpenStackNovaController($adminCredentials);
 }
 function __construct()
 {
     parent::__construct('NovaProject', 'manageproject');
 }
 function __construct()
 {
     parent::__construct('NovaSecurityGroup', 'listall');
 }
	function __construct() {
		parent::__construct( 'NovaSudoer', 'manageproject' );

		$this->userLDAP = new OpenStackNovaUser();
	}
 function __construct()
 {
     parent::__construct('NovaDomain', 'managednsdomain');
 }
Exemplo n.º 7
0
 function __construct()
 {
     parent::__construct('NovaInstance');
 }
	function __construct() {
		parent::__construct( 'NovaVolume' );
	}
 /**
  * @param $user OpenStackNovaUser
  * @return string
  */
 static function getKeyList($user)
 {
     global $wgOpenStackManagerNovaKeypairStorage;
     $keyInfo = array();
     if ($wgOpenStackManagerNovaKeypairStorage === 'nova') {
         $projects = $user->getProjects();
         $keyInfo['keyname'] = array('type' => 'text', 'label-message' => 'openstackmanager-novakeyname', 'default' => '', 'name' => 'keyname');
         $project_keys = array();
         foreach ($projects as $project) {
             $project_keys[$project] = $project;
         }
         $keyInfo['project'] = array('type' => 'select', 'options' => $project_keys, 'label-message' => 'openstackmanager-project', 'name' => 'project');
     }
     $keyInfo['key'] = array('type' => 'textarea', 'default' => '', 'label-message' => 'openstackmanager-novapublickey', 'name' => 'key');
     $out = '';
     if ($wgOpenStackManagerNovaKeypairStorage === 'nova') {
         # TODO: add project filter
         foreach ($projects as $project) {
             $userCredentials = $user->getCredentials();
             $userNova = new OpenStackNovaController($userCredentials, $project);
             $keypairs = $userNova->getKeypairs();
             if (!$keypairs) {
                 continue;
             }
             $out .= Html::element('h2', array(), $project);
             $headers = array('openstackmanager-name', 'openstackmanager-fingerprint');
             $keyRows = array();
             foreach ($keypairs as $keypair) {
                 $keyRow = array();
                 SpecialNova::pushResourceColumn($keyRow, $keypair->getKeyName());
                 SpecialNova::pushResourceColumn($keyRow, $keypair->getKeyFingerprint());
                 $keyRows[] = $keyRow;
             }
             $out .= SpecialNova::createResourceTable($headers, $keyRows);
         }
     } elseif ($wgOpenStackManagerNovaKeypairStorage === 'ldap') {
         $headers = array('openstackmanager-keys', 'openstackmanager-actions');
         $keypairs = $user->getKeypairs();
         $keyRows = array();
         foreach ($keypairs as $hash => $key) {
             $keyRow = array();
             SpecialNova::pushResourceColumn($keyRow, $key, array('class' => 'Nova_col'));
             $actions = array();
             $actions[] = SpecialNova::createNovaKeyActionLink('openstackmanager-delete', array('action' => 'delete', 'hash' => $hash, 'returnto' => SpecialPage::getTitleFor('Preferences', false, 'mw-prefsection-openstack')->getFullText()));
             SpecialNova::pushRawResourceColumn($keyRow, SpecialNova::createResourceList($actions));
             $keyRows[] = $keyRow;
         }
         $out .= SpecialNova::createResourceTable($headers, $keyRows);
     }
     $out .= Linker::link(SpecialPage::getTitleFor('NovaKey'), wfMessage('openstackmanager-addkey')->escaped(), array(), array('returnto' => SpecialPage::getTitleFor('Preferences', false, 'mw-prefsection-openstack')->getFullText()));
     return $out;
 }
Exemplo n.º 10
0
 function __construct()
 {
     parent::__construct('NovaKey');
 }
 function __construct()
 {
     parent::__construct('NovaResources');
 }
 function __construct()
 {
     parent::__construct('NovaProxy');
 }
 function __construct()
 {
     parent::__construct('NovaPuppetGroup', 'manageglobalpuppet');
 }
	function __construct() {
		parent::__construct( 'NovaAddress' );
	}
Exemplo n.º 15
0
 function __construct()
 {
     parent::__construct('NovaPuppetGroup', 'manageproject');
 }
 function __construct()
 {
     parent::__construct('NovaSudoer');
 }