Index: trunk/extensions/OpenStackManager/SpecialCreateInstance.php |
— | — | @@ -4,9 +4,10 @@ |
5 | 5 | var $adminNova, $userNova; |
6 | 6 | |
7 | 7 | function __construct() { |
| 8 | + global $wgOpenStackManagerNovaAdminKeys; |
8 | 9 | parent::__construct( 'OpenStackCreateInstance' ); |
9 | 10 | wfLoadExtensionMessages('OpenStackManager'); |
10 | | - $credentials = array( 'accessKey' => 'ced15cc2-3181-487b-bd06-f6ed176e3db7:admin', 'secretKey' => 'f3b1a6bb-2812-4eaa-9818-d3693663a800' ); |
| 11 | + $credentials = $wgOpenStackManagerNovaAdminKeys; |
11 | 12 | $this->adminNova = new OpenStackNovaController( $credentials ); |
12 | 13 | |
13 | 14 | } |
Index: trunk/extensions/OpenStackManager/OpenStackNovaController.php |
— | — | @@ -10,11 +10,14 @@ |
11 | 11 | |
12 | 12 | # TODO: Make disable_ssl, hostname, and resource_prefix config options |
13 | 13 | function __construct( $credentials ) { |
| 14 | + global $wgOpenStackManagerNovaDisableSSL, $wgOpenStackManagerNovaPort, |
| 15 | + $wgOpenStackManagerNovaServerName, $wgOpenStackManagerNovaPort, |
| 16 | + $wgOpenStackManagerNovaResourcePrefix; |
14 | 17 | wfLoadExtensionMessages('OpenStackManager'); |
15 | 18 | $this->novaConnection = new AmazonEC2( $credentials['accessKey'], $credentials['secretKey'] ); |
16 | | - $this->novaConnection->disable_ssl(true); |
17 | | - $this->novaConnection->set_hostname('controller', 8773); |
18 | | - $this->novaConnection->set_resource_prefix('/services/Cloud/'); |
| 19 | + $this->novaConnection->disable_ssl($wgOpenStackManagerNovaDisableSSL); |
| 20 | + $this->novaConnection->set_hostname($wgOpenStackManagerNovaServerName, $wgOpenStackManagerNovaPort); |
| 21 | + $this->novaConnection->set_resource_prefix($wgOpenStackManagerNovaResourcePrefix); |
19 | 22 | $this->instances = Array(); |
20 | 23 | } |
21 | 24 | |
Index: trunk/extensions/OpenStackManager/OpenStackManager.php |
— | — | @@ -25,6 +25,11 @@ |
26 | 26 | 'descriptionmsg' => 'openstackmanager-desc', |
27 | 27 | ); |
28 | 28 | |
| 29 | +$wgOpenStackManagerNovaDisableSSL = true; |
| 30 | +$wgOpenStackManagerNovaServerName = 'localhost'; |
| 31 | +$wgOpenStackManagerNovaPort = 8773; |
| 32 | +$wgOpenStackManagerNovaResourcePrefix = '/services/Cloud/'; |
| 33 | + |
29 | 34 | $dir = dirname(__FILE__) . '/'; |
30 | 35 | |
31 | 36 | $wgExtensionMessagesFiles['OpenStackManager'] = $dir . 'OpenStackManager.i18n.php'; |