[icinga-checkins] icinga.org: icingaweb2-module-director/master: ImportSourceCoreApi: allow to import user groups

git at icinga.org git at icinga.org
Wed Aug 24 16:23:48 CEST 2016


Module: icingaweb2-module-director
Branch: master
Commit: b8b047a1e4b6907616624b0d8d234f914007da3a
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=b8b047a1e4b6907616624b0d8d234f914007da3a

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Aug 24 14:15:40 2016 +0000

ImportSourceCoreApi: allow to import user groups

fixes #11511

---

 library/Director/Core/CoreApi.php               |    9 ++++++++-
 library/Director/Import/ImportSourceCoreApi.php |    1 +
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/library/Director/Core/CoreApi.php b/library/Director/Core/CoreApi.php
index 2a3d7df..c7b467f 100644
--- a/library/Director/Core/CoreApi.php
+++ b/library/Director/Core/CoreApi.php
@@ -413,7 +413,14 @@ constants
     public function getHostGroupObjects()
     {
         return $this->getDirectorObjects('HostGroup', 'HostGroup', 'hostgroups', array(
-            'display_name'          => 'display_name',
+            'display_name' => 'display_name',
+        ));
+    }
+
+    public function getUserGroupObjects()
+    {
+        return $this->getDirectorObjects('UserGroup', 'UserGroup', 'usergroups', array(
+            'display_name' => 'display_name',
         ));
     }
 
diff --git a/library/Director/Import/ImportSourceCoreApi.php b/library/Director/Import/ImportSourceCoreApi.php
index 769c58a..7d80381 100644
--- a/library/Director/Import/ImportSourceCoreApi.php
+++ b/library/Director/Import/ImportSourceCoreApi.php
@@ -62,6 +62,7 @@ class ImportSourceCoreApi extends ImportSourceHook
             'Host'          => $form->translate('Hosts'),
             'HostGroup'     => $form->translate('Hostgroups'),
             'User'          => $form->translate('Users'),
+            'UserGroup'     => $form->translate('Usergroups'),
             'Zone'          => $form->translate('Zones'),
         );
 



More information about the icinga-checkins mailing list