Index: trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php |
— | — | @@ -109,9 +109,9 @@ |
110 | 110 | $wgOut->setPagetitle( wfMsg( 'openstackmanager-configuresecuritygroup' ) ); |
111 | 111 | |
112 | 112 | $securitygroupname = $wgRequest->getText( 'groupname' ); |
113 | | - $securitygroup = $this->adminNova->getSecurityGroup( $securitygroupname ); |
| 113 | + $project = $wgRequest->getText( 'project' ); |
| 114 | + $securitygroup = $this->adminNova->getSecurityGroup( $securitygroupname, $project ); |
114 | 115 | $description = $securitygroup->getGroupDescription(); |
115 | | - $project = $wgRequest->getText( 'project' ); |
116 | 116 | if ( ! $this->userLDAP->inRole( 'netadmin', $project ) ) { |
117 | 117 | $this->notInRole( 'netadmin' ); |
118 | 118 | return false; |
— | — | @@ -512,7 +512,7 @@ |
513 | 513 | $project = $formData['project']; |
514 | 514 | $userCredentials = $this->userLDAP->getCredentials( $project ); |
515 | 515 | $this->userNova = new OpenStackNovaController( $userCredentials ); |
516 | | - $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] ); |
| 516 | + $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'], $project ); |
517 | 517 | if ( !$securitygroup ) { |
518 | 518 | $wgOut->addWikiMsg( 'openstackmanager-nonexistantsecuritygroup' ); |
519 | 519 | return true; |
— | — | @@ -541,9 +541,10 @@ |
542 | 542 | function tryConfigureSubmit( $formData, $entryPoint = 'internal' ) { |
543 | 543 | global $wgOut; |
544 | 544 | |
| 545 | + $project = $formData['project']; |
545 | 546 | $groupname = $formData['groupname']; |
546 | 547 | $description = $formData['description']; |
547 | | - $group = $this->adminNova->getSecurityGroup( $groupname ); |
| 548 | + $group = $this->adminNova->getSecurityGroup( $groupname, $project ); |
548 | 549 | if ( $group ) { |
549 | 550 | # This isn't a supported function in the API for now. Leave this action out for now |
550 | 551 | $success = $this->userNova->modifySecurityGroup( $groupname, array( 'description' => $description ) ); |
— | — | @@ -587,7 +588,7 @@ |
588 | 589 | } |
589 | 590 | $userCredentials = $this->userLDAP->getCredentials( $project ); |
590 | 591 | $this->userNova = new OpenStackNovaController( $userCredentials ); |
591 | | - $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] ); |
| 592 | + $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'], $project ); |
592 | 593 | if ( ! $securitygroup ) { |
593 | 594 | $wgOut->addWikiMsg( 'openstackmanager-nonexistantsecuritygroup' ); |
594 | 595 | return false; |
— | — | @@ -635,7 +636,7 @@ |
636 | 637 | } |
637 | 638 | $userCredentials = $this->userLDAP->getCredentials( $project ); |
638 | 639 | $this->userNova = new OpenStackNovaController( $userCredentials ); |
639 | | - $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'] ); |
| 640 | + $securitygroup = $this->adminNova->getSecurityGroup( $formData['groupname'], $project ); |
640 | 641 | if ( ! $securitygroup ) { |
641 | 642 | $wgOut->addWikiMsg( 'openstackmanager-nonexistantsecuritygroup' ); |
642 | 643 | return false; |
Index: trunk/extensions/OpenStackManager/OpenStackManager.i18n.php |
— | — | @@ -248,8 +248,8 @@ |
249 | 249 | 'openstackmanager-deletesecuritygroup-confirm' => 'Are you sure you would like to delete $1?', |
250 | 250 | 'openstackmanager-securitygrouplist' => 'Security group list', |
251 | 251 | 'openstackmanager-securitygrouprule' => 'Rules', |
252 | | - 'openstackmanager-securitygrouprule-toport' => 'To port', |
253 | | - 'openstackmanager-securitygrouprule-fromport' => 'From port', |
| 252 | + 'openstackmanager-securitygrouprule-toport' => 'End of port range', |
| 253 | + 'openstackmanager-securitygrouprule-fromport' => 'Beginning of port range', |
254 | 254 | 'openstackmanager-securitygrouprule-protocol' => 'Protocol', |
255 | 255 | 'openstackmanager-securitygrouprule-ipranges' => 'CIDR ranges', |
256 | 256 | 'openstackmanager-securitygrouprule-groups' => 'Source group', |