20after4 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/258516
Change subject: OpenStackManager: remove obsolete isVirtual() handling
......................................................................
OpenStackManager: remove obsolete isVirtual() handling
That legacy code was transitional from an old way of doing
project groups that does not exist any more and can never be
active again.
Cleanup to simplify the fixes required by the change to
slapd.
Bug: T121064
Change-Id: Id621acc864f75f9406dfe830bb1adff28628a55c
(cherry picked from commit 047bb890c806e85118d74b27867ac9cf9e434eb4)
---
M nova/OpenStackNovaProject.php
M nova/OpenStackNovaProjectGroup.php
2 files changed, 7 insertions(+), 28 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenStackManager
refs/changes/16/258516/1
diff --git a/nova/OpenStackNovaProject.php b/nova/OpenStackNovaProject.php
index e4936a3..a2d572d 100644
--- a/nova/OpenStackNovaProject.php
+++ b/nova/OpenStackNovaProject.php
@@ -134,19 +134,14 @@
// If we couldn't find an corresponding Project Group,
// then we should create one now.
- if ( !$this->projectGroup->loaded or
$this->projectGroup->isVirtual() ) {
- $wgAuth->printDebug(
$this->projectGroup->getProjectGroupName() . " either does not exist or is a
virtual static group. Recreating is as a real group and syncing members.",
NONSENSITIVE );
+ if ( !$this->projectGroup->loaded ) {
+ $wgAuth->printDebug(
$this->projectGroup->getProjectGroupName() . " does not exist. Creating it.",
NONSENSITIVE );
- // Delete, recreate, and then sync the members.
- $deleteSuccess =
OpenStackNovaProjectGroup::deleteProjectGroup( $this->projectname );
- // if we successfully deleted the ProjectGroup, then
recreate it now.
- if ( $deleteSuccess ) {
- $createSuccess =
OpenStackNovaProjectGroup::createProjectGroup( $this->projectname );
- // Aaaaand if we successfully created the
group, then finally sync the members from this project now.
- if ( $createSuccess ) {
- $this->projectGroup = new
OpenStackNovaProjectGroup( $this->projectname );
- $this->syncProjectGroupMembers();
- }
+ $createSuccess =
OpenStackNovaProjectGroup::createProjectGroup( $this->projectname );
+ // Aaaaand if we successfully created the group, then
finally sync the members from this project now.
+ if ( $createSuccess ) {
+ $this->projectGroup = new
OpenStackNovaProjectGroup( $this->projectname );
+ $this->syncProjectGroupMembers();
}
}
}
diff --git a/nova/OpenStackNovaProjectGroup.php
b/nova/OpenStackNovaProjectGroup.php
index 9d4a80b..d533842 100644
--- a/nova/OpenStackNovaProjectGroup.php
+++ b/nova/OpenStackNovaProjectGroup.php
@@ -77,22 +77,6 @@
}
/**
- * Returns true if this ProjectGroup is a
- * 'ds-virtual-static-group', meaning that
- * it doesn't really have any member
- * attributes of its own.
- *
- * Virtual static groups were the previous
- * way of associating projects with posix groups.
- * We now manually keep the list of members in sync
- * when they are added and removed from a Project.
- */
- function isVirtual() {
- $this->fetchProjectGroupInfo(false);
- return ( array_search( 'ds-virtual-static-group',
$this->projectGroupInfo[0]['objectclass'] ) !== false );
- }
-
- /**
* Return all users who are a member of this project
*
* @return array
--
To view, visit https://gerrit.wikimedia.org/r/258516
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id621acc864f75f9406dfe830bb1adff28628a55c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenStackManager
Gerrit-Branch: wmf/1.27.0-wmf.8
Gerrit-Owner: 20after4 <[email protected]>
Gerrit-Reviewer: coren <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits