Index: trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php |
— | — | @@ -356,24 +356,28 @@ |
357 | 357 | $securityGroupInfo['project'] = array( |
358 | 358 | 'type' => 'hidden', |
359 | 359 | 'default' => $project, |
| 360 | + 'section' => 'rule/singlerule', |
360 | 361 | 'name' => 'project', |
361 | 362 | ); |
362 | 363 | $securityGroupInfo['fromport'] = array( |
363 | 364 | 'type' => 'text', |
364 | 365 | 'label-message' => 'openstackmanager-securitygrouprule-fromport', |
365 | 366 | 'default' => '', |
| 367 | + 'section' => 'rule/singlerule', |
366 | 368 | 'name' => 'fromport', |
367 | 369 | ); |
368 | 370 | $securityGroupInfo['toport'] = array( |
369 | 371 | 'type' => 'text', |
370 | 372 | 'label-message' => 'openstackmanager-securitygrouprule-toport', |
371 | 373 | 'default' => '', |
| 374 | + 'section' => 'rule/singlerule', |
372 | 375 | 'name' => 'toport', |
373 | 376 | ); |
374 | 377 | $securityGroupInfo['protocol'] = array( |
375 | 378 | 'type' => 'select', |
376 | 379 | 'label-message' => 'openstackmanager-securitygrouprule-protocol', |
377 | 380 | 'options' => array( '' => '', 'icmp' => 'icmp', 'tcp' => 'tcp', 'udp' => 'udp' ), |
| 381 | + 'section' => 'rule/singlerule', |
378 | 382 | 'name' => 'protocol', |
379 | 383 | ); |
380 | 384 | $securityGroupInfo['ranges'] = array( |
— | — | @@ -381,13 +385,20 @@ |
382 | 386 | 'label-message' => 'openstackmanager-securitygrouprule-ranges', |
383 | 387 | 'help-message' => 'openstackmanager-securitygrouprule-ranges-help', |
384 | 388 | 'default' => '', |
| 389 | + 'section' => 'rule/singlerule', |
385 | 390 | 'name' => 'ranges', |
386 | 391 | ); |
| 392 | + $securityGroupInfo['info'] = array( |
| 393 | + 'type' => 'info', |
| 394 | + 'default' => wfMsg( 'openstackmanager-securitygrouprule-group-exclusive' ), |
| 395 | + 'section' => 'rule/group', |
| 396 | + ); |
387 | 397 | $securityGroupInfo['groups'] = array( |
388 | 398 | 'type' => 'multiselect', |
389 | 399 | 'label-message' => 'openstackmanager-securitygrouprule-groups', |
390 | 400 | 'help-message' => 'openstackmanager-securitygrouprule-groups-help', |
391 | 401 | 'options' => $group_keys, |
| 402 | + 'section' => 'rule/group', |
392 | 403 | 'name' => 'groups', |
393 | 404 | ); |
394 | 405 | $securityGroupInfo['action'] = array( |
Index: trunk/extensions/OpenStackManager/OpenStackManager.i18n.php |
— | — | @@ -249,6 +249,10 @@ |
250 | 250 | 'openstackmanager-deletesecuritygroup-confirm' => 'Are you sure you would like to delete $1?', |
251 | 251 | 'openstackmanager-securitygrouplist' => 'Security group list', |
252 | 252 | 'openstackmanager-securitygrouprule' => 'Rules', |
| 253 | + 'openstackmanager-novasecuritygroup-rule' => 'Security group rule', |
| 254 | + 'openstackmanager-novasecuritygroup-singlerule' => 'Individual rule', |
| 255 | + 'openstackmanager-novasecuritygroup-group' => 'Group rule', |
| 256 | + 'openstackmanager-securitygrouprule-group-exclusive' => 'Note: group rules are mutually exclusive from individual rules.', |
253 | 257 | 'openstackmanager-securitygrouprule-toport' => 'End of port range', |
254 | 258 | 'openstackmanager-securitygrouprule-fromport' => 'Beginning of port range', |
255 | 259 | 'openstackmanager-securitygrouprule-protocol' => 'Protocol', |
Index: trunk/extensions/OpenStackManager/OpenStackNovaController.php |
— | — | @@ -380,7 +380,7 @@ |
381 | 381 | * @return |
382 | 382 | */ |
383 | 383 | function deleteSecurityGroup( $groupname ) { |
384 | | - $response = $this->novaConnection->delete_security_group( array( 'GroupName' => $groupname ) ); |
| 384 | + $response = $this->novaConnection->delete_security_group( $groupname ); |
385 | 385 | |
386 | 386 | return $response->isOK(); |
387 | 387 | } |
— | — | @@ -507,7 +507,7 @@ |
508 | 508 | * @return |
509 | 509 | */ |
510 | 510 | function releaseAddress( $ip ) { |
511 | | - $response = $this->novaConnection->release_address( array( 'PublicIp' => $ip ) ); |
| 511 | + $response = $this->novaConnection->release_address( $ip ); |
512 | 512 | |
513 | 513 | return $response->isOK(); |
514 | 514 | } |