]> granicus.if.org Git - icinga2/commitdiff
Removed alias property, added display_name.
authorGunnar Beutner <gunnar.beutner@netways.de>
Sat, 9 Feb 2013 16:50:47 +0000 (17:50 +0100)
committerGunnar Beutner <gunnar.beutner@netways.de>
Sat, 9 Feb 2013 16:50:47 +0000 (17:50 +0100)
components/compat/compatcomponent.cpp
components/compatido/compatidocomponent.cpp
lib/icinga/host.cpp
lib/icinga/host.h
lib/icinga/hostgroup.cpp
lib/icinga/hostgroup.h
lib/icinga/service.cpp
lib/icinga/service.h
lib/icinga/servicegroup.cpp
lib/icinga/servicegroup.h

index 5332bbae55b54bc11c477552ecbc699b606f46cc..dc56bbcf38be93dde898190c1f90ee78c366818a 100644 (file)
@@ -279,7 +279,7 @@ void CompatComponent::DumpHostObject(ofstream& fp, const Host::Ptr& host)
 {
        fp << "define host {" << "\n"
           << "\t" << "host_name" << "\t" << host->GetName() << "\n"
-          << "\t" << "alias" << "\t" << host->GetAlias() << "\n"
+          << "\t" << "display_name" << "\t" << host->GetDisplayName() << "\n"
           << "\t" << "check_interval" << "\t" << 1 << "\n"
           << "\t" << "retry_interval" << "\t" << 1 << "\n"
           << "\t" << "max_check_attempts" << "\t" << 1 << "\n"
@@ -380,7 +380,7 @@ void CompatComponent::DumpServiceObject(ofstream& fp, const Service::Ptr& servic
        fp << "define service {" << "\n"
           << "\t" << "host_name" << "\t" << service->GetHost()->GetName() << "\n"
           << "\t" << "service_description" << "\t" << service->GetShortName() << "\n"
-          << "\t" << "display_name" << "\t" << service->GetAlias() << "\n"
+          << "\t" << "display_name" << "\t" << service->GetDisplayName() << "\n"
           << "\t" << "check_command" << "\t" << "check_i2" << "\n"
           << "\t" << "check_interval" << "\t" << service->GetCheckInterval() / 60.0 << "\n"
           << "\t" << "retry_interval" << "\t" << service->GetRetryInterval() / 60.0 << "\n"
@@ -471,7 +471,7 @@ void CompatComponent::StatusTimerHandler(void)
 
                objectfp << "define hostgroup {" << "\n"
                         << "\t" << "hostgroup_name" << "\t" << hg->GetName() << "\n"
-                        << "\t" << "alias" << "\t" << hg->GetAlias() << "\n"
+                        << "\t" << "display_name" << "\t" << hg->GetDisplayName() << "\n"
                         << "\t" << "notes_url" << "\t" << hg->GetNotesUrl() << "\n"
                         << "\t" << "action_url" << "\t" << hg->GetActionUrl() << "\n";
 
@@ -493,7 +493,7 @@ void CompatComponent::StatusTimerHandler(void)
 
                objectfp << "define servicegroup {" << "\n"
                         << "\t" << "servicegroup_name" << "\t" << sg->GetName() << "\n"
-                        << "\t" << "alias" << "\t" << sg->GetAlias() << "\n"
+                        << "\t" << "display_name" << "\t" << sg->GetDisplayName() << "\n"
                         << "\t" << "notes_url" << "\t" << sg->GetNotesUrl() << "\n"
                         << "\t" << "action_url" << "\t" << sg->GetActionUrl() << "\n";
 
index f5a4b4bb908c96a42e4743a20463560309665a20..894fba0d1f059d95f6893060c9a6ee486d370de6 100644 (file)
@@ -307,7 +307,7 @@ void CompatIdoComponent::EnableServiceObject(const Service::Ptr& service)
                << 500 << ":" << "\n"                                   /* enableobject */
                << 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n"              /* timestamp */
                << 53 << "=" << service->GetHost()->GetName() << "\n"   /* host */
-               << 114 << "=" << service->GetAlias() << "\n"            /* service */
+               << 114 << "=" << service->GetShortName() << "\n"            /* service */
                << 999 << "\n\n";                                       /* enddata */
 
        m_IdoConnection->SendMessage(message.str());
@@ -338,7 +338,7 @@ void CompatIdoComponent::DisableServiceObject(const Service::Ptr& service)
                << 501 << ":" << "\n"                                   /* disableobject */
                << 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n"              /* timestamp */
                << 53 << "=" << service->GetHost()->GetName() << "\n"   /* host */
-               << 114 << "=" << service->GetAlias() << "\n"            /* service */
+               << 114 << "=" << service->GetShortName() << "\n"            /* service */
                << 999 << "\n\n";                                       /* enddata */
  
        m_IdoConnection->SendMessage(message.str());
@@ -360,8 +360,8 @@ void CompatIdoComponent::DumpHostObject(const Host::Ptr& host)
                << 400 << ":" << "\n"                                   /* hostdefinition */
                << 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n"              /* timestamp */
                << 174 << "=" << host->GetName() << "\n"                /* hostname */
-               << 258 << "=" << host->GetAlias() << "\n"               /* displayname */
-               << 159 << "=" << host->GetAlias() << "\n"               /* hostalias */
+               << 258 << "=" << host->GetDisplayName() << "\n"         /* displayname */
+               << 159 << "=" << host->GetName() << "\n"                /* hostalias */
                << 158 << "=" << host->GetName() << "\n"                /* hostaddress */
                << 266 << "=" << host->GetName() << "\n"                /* hostaddress6 */
                << 160 << "=" << "" << "\n"                             /* hostcheckcommand */
@@ -511,7 +511,7 @@ void CompatIdoComponent::DumpHostStatus(const Host::Ptr& host)
 void CompatIdoComponent::DumpServiceObject(const Service::Ptr& service)
 {
        stringstream log;
-       log << "Dumping Service Config: " << service->GetHost()->GetName() << "->" << service->GetAlias();
+       log << "Dumping Service Config: " << service->GetHost()->GetName() << "->" << service->GetShortName();
        Logger::Write(LogDebug, "compatido", log.str());
 
        stringstream message;
@@ -519,8 +519,8 @@ void CompatIdoComponent::DumpServiceObject(const Service::Ptr& service)
                << 402 << ":" << "\n"                                   /* servicedefinition */
                << 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n"              /* timestamp */
                << 174 << "=" << service->GetHost()->GetName() << "\n"  /* hostname */
-               << 258  << "=" << service->GetAlias() << "\n"           /* displayname */
-               << 210 << "=" << service->GetAlias() << "\n"            /* servicedescription */
+               << 258  << "=" << service->GetDisplayName() << "\n"             /* displayname */
+               << 210 << "=" << service->GetShortName() << "\n"                /* servicedescription */
                << 207 << "=" << "check_i2" << "\n"                     /* servicecheckcommand */
                << 211 << "=" << "" << "\n"                             /* serviceeventhandler */
                << 224 << "=" << "" << "\n"                             /* servicenotificationperiod */
@@ -585,7 +585,7 @@ void CompatIdoComponent::DumpServiceObject(const Service::Ptr& service)
 void CompatIdoComponent::DumpServiceStatus(const Service::Ptr& service)
 {
        stringstream log;
-       log << "Dumping Service Status: " << service->GetHost()->GetName() << "->" << service->GetAlias();
+       log << "Dumping Service Status: " << service->GetHost()->GetName() << "->" << service->GetShortName();
        Logger::Write(LogDebug, "compatido", log.str());
 
        String output;
@@ -620,7 +620,7 @@ void CompatIdoComponent::DumpServiceStatus(const Service::Ptr& service)
                << 3 << "=" << "" << "\n"                               /* attributes */
                << 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n"              /* timestamp */
                << 53 << "=" << service->GetHost()->GetName() << "\n"   /* host */
-               << 114 << "=" << service->GetAlias() << "\n"            /* service */
+               << 114 << "=" << service->GetShortName() << "\n"                /* service */
                << 95 << "=" << output << "\n"                          /* output */
                << 125 << "=" << "" << "\n"                             /* longoutput */
                << 99 << "=" << perfdata << "\n"                        /* perfdata */
@@ -755,7 +755,7 @@ void CompatIdoComponent::DumpConfigObjects(void)
                        << 401 << ":" << "\n"                           /* hostgroupdefinition */
                        << 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n"      /* timestamp */
                        << 172 << "=" << hg->GetName() << "\n"                  /* hostgroupname */
-                       << 170 << "=" << hg->GetAlias() << "\n";        /* hostgroupalias */
+                       << 170 << "=" << hg->GetName() << "\n"; /* hostgroupalias */
 
                vector<String> hglist;
 
@@ -788,14 +788,14 @@ void CompatIdoComponent::DumpConfigObjects(void)
                        << 403 << ":" << "\n"                           /* servicegroupdefinition */
                        << 4 << "=" << std::setprecision(17) << Utility::GetTime() << "\n"      /* timestamp */
                        << 220 << "=" << sg->GetName() << "\n"                  /* servicegroupname */
-                       << 218 << "=" << sg->GetAlias() << "\n";        /* servicegroupalias */
+                       << 218 << "=" << sg->GetName() << "\n"; /* servicegroupalias */
 
                vector<String> sglist;
                vector<Service::Ptr>::iterator vt;
 
                BOOST_FOREACH(const Service::Ptr& service, sg->GetMembers()) {
                        sglist.push_back(service->GetHost()->GetName());
-                       sglist.push_back(service->GetAlias());
+                       sglist.push_back(service->GetShortName());
                }
        
                SendMessageList(message, sglist, 219);          /* servicegroupmember */
index 48a14a829179b3453c771423f09517f9bf0dc94f..a0bf5ea20b25b28f77f222ee9092baeadaa403a6 100644 (file)
@@ -57,7 +57,7 @@ Host::~Host(void)
        }
 }
 
-String Host::GetAlias(void) const
+String Host::GetDisplayName(void) const
 {
        String value = Get("alias");
        if (!value.IsEmpty())
index 41b0f2d71b5b42369ea50e09a3bf5a342b5ac761..224414a6184bd1cf63b150e9872e98e03c210895 100644 (file)
@@ -43,7 +43,7 @@ public:
        static bool Exists(const String& name);
        static Host::Ptr GetByName(const String& name);
 
-       String GetAlias(void) const;
+       String GetDisplayName(void) const;
        Dictionary::Ptr GetGroups(void) const;
 
        Dictionary::Ptr GetMacros(void) const;
index 137768c725e7778e603cf5e0cd8d9a46c47f99e4..b09946d7c50cb8c74c1720ad87e7ea662efdc515 100644 (file)
@@ -26,7 +26,7 @@ bool HostGroup::m_MembersCacheValid = true;
 
 REGISTER_TYPE(HostGroup, NULL);
 
-String HostGroup::GetAlias(void) const
+String HostGroup::GetDisplayName(void) const
 {
        String value = Get("alias");
 
index 4c6079a44ca340a8d5515ab21e78ab9b31501de9..a3c28760c53974a70e5603ac65590b451020a4bc 100644 (file)
@@ -41,7 +41,7 @@ public:
        static bool Exists(const String& name);
        static HostGroup::Ptr GetByName(const String& name);
 
-       String GetAlias(void) const;
+       String GetDisplayName(void) const;
        String GetNotesUrl(void) const;
        String GetActionUrl(void) const;
 
index 41858a65754da4bafc3bb171a02aca09bd6571ea..a614d886b15b07deb810b1a21c70e609459003e1 100644 (file)
@@ -70,7 +70,7 @@ Service::~Service(void)
        Service::InvalidateCommentCache();
 }
 
-String Service::GetAlias(void) const
+String Service::GetDisplayName(void) const
 {
        String value = Get("alias");
 
index f8033b14a2b2b966bb62dc170a0fdbbc71692f42..dfda3399b2950e9503003f1675e55da9cfdf5432 100644 (file)
@@ -98,7 +98,7 @@ public:
        static const int DefaultCheckInterval;
        static const int CheckIntervalDivisor;
 
-       String GetAlias(void) const;
+       String GetDisplayName(void) const;
        Host::Ptr GetHost(void) const;
        Dictionary::Ptr GetMacros(void) const;
        Dictionary::Ptr GetDowntimes(void) const;
index 7479a68cde5f7cdb26a52377a60d6bc2c99af98b..3c4b091609ae2f7c513bcf9240b928557c17ff66 100644 (file)
@@ -26,7 +26,7 @@ bool ServiceGroup::m_MembersCacheValid;
 
 REGISTER_TYPE(ServiceGroup, NULL);
 
-String ServiceGroup::GetAlias(void) const
+String ServiceGroup::GetDisplayName(void) const
 {
        String value = Get("alias");
 
index c8dbd8da81c3c3894d5b08339eb7743e51c9fbd5..b7ed563189223ae5f928541fe00fff4bbf0e53c2 100644 (file)
@@ -41,7 +41,7 @@ public:
        static bool Exists(const String& name);
        static ServiceGroup::Ptr GetByName(const String& name);
 
-       String GetAlias(void) const;
+       String GetDisplayName(void) const;
        String GetNotesUrl(void) const;
        String GetActionUrl(void) const;