r107098 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107097‎ | r107098 | r107099 >
Date:19:33, 22 December 2011
Author:laner
Status:ok
Tags:openstack 
Comment:
Clarify that group rules and individual rules are mutually exclusive.
Modified paths:
  • /trunk/extensions/OpenStackManager/OpenStackManager.i18n.php (modified) (history)
  • /trunk/extensions/OpenStackManager/OpenStackNovaController.php (modified) (history)
  • /trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/OpenStackManager/special/SpecialNovaSecurityGroup.php
@@ -356,24 +356,28 @@
357357 $securityGroupInfo['project'] = array(
358358 'type' => 'hidden',
359359 'default' => $project,
 360+ 'section' => 'rule/singlerule',
360361 'name' => 'project',
361362 );
362363 $securityGroupInfo['fromport'] = array(
363364 'type' => 'text',
364365 'label-message' => 'openstackmanager-securitygrouprule-fromport',
365366 'default' => '',
 367+ 'section' => 'rule/singlerule',
366368 'name' => 'fromport',
367369 );
368370 $securityGroupInfo['toport'] = array(
369371 'type' => 'text',
370372 'label-message' => 'openstackmanager-securitygrouprule-toport',
371373 'default' => '',
 374+ 'section' => 'rule/singlerule',
372375 'name' => 'toport',
373376 );
374377 $securityGroupInfo['protocol'] = array(
375378 'type' => 'select',
376379 'label-message' => 'openstackmanager-securitygrouprule-protocol',
377380 'options' => array( '' => '', 'icmp' => 'icmp', 'tcp' => 'tcp', 'udp' => 'udp' ),
 381+ 'section' => 'rule/singlerule',
378382 'name' => 'protocol',
379383 );
380384 $securityGroupInfo['ranges'] = array(
@@ -381,13 +385,20 @@
382386 'label-message' => 'openstackmanager-securitygrouprule-ranges',
383387 'help-message' => 'openstackmanager-securitygrouprule-ranges-help',
384388 'default' => '',
 389+ 'section' => 'rule/singlerule',
385390 'name' => 'ranges',
386391 );
 392+ $securityGroupInfo['info'] = array(
 393+ 'type' => 'info',
 394+ 'default' => wfMsg( 'openstackmanager-securitygrouprule-group-exclusive' ),
 395+ 'section' => 'rule/group',
 396+ );
387397 $securityGroupInfo['groups'] = array(
388398 'type' => 'multiselect',
389399 'label-message' => 'openstackmanager-securitygrouprule-groups',
390400 'help-message' => 'openstackmanager-securitygrouprule-groups-help',
391401 'options' => $group_keys,
 402+ 'section' => 'rule/group',
392403 'name' => 'groups',
393404 );
394405 $securityGroupInfo['action'] = array(
Index: trunk/extensions/OpenStackManager/OpenStackManager.i18n.php
@@ -249,6 +249,10 @@
250250 'openstackmanager-deletesecuritygroup-confirm' => 'Are you sure you would like to delete $1?',
251251 'openstackmanager-securitygrouplist' => 'Security group list',
252252 '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.',
253257 'openstackmanager-securitygrouprule-toport' => 'End of port range',
254258 'openstackmanager-securitygrouprule-fromport' => 'Beginning of port range',
255259 'openstackmanager-securitygrouprule-protocol' => 'Protocol',
Index: trunk/extensions/OpenStackManager/OpenStackNovaController.php
@@ -380,7 +380,7 @@
381381 * @return
382382 */
383383 function deleteSecurityGroup( $groupname ) {
384 - $response = $this->novaConnection->delete_security_group( array( 'GroupName' => $groupname ) );
 384+ $response = $this->novaConnection->delete_security_group( $groupname );
385385
386386 return $response->isOK();
387387 }
@@ -507,7 +507,7 @@
508508 * @return
509509 */
510510 function releaseAddress( $ip ) {
511 - $response = $this->novaConnection->release_address( array( 'PublicIp' => $ip ) );
 511+ $response = $this->novaConnection->release_address( $ip );
512512
513513 return $response->isOK();
514514 }

Status & tagging log