mirror of https://github.com/Icinga/icinga2.git
parent
ed4def7ee8
commit
e6c6a7dc52
|
@ -20,7 +20,7 @@ define objects the `object` keyword is used:
|
||||||
|
|
||||||
> **Note**
|
> **Note**
|
||||||
>
|
>
|
||||||
> Colons (:) are not permitted in object names.
|
> Exclamation marks (!) are not permitted in object names.
|
||||||
|
|
||||||
Each object is uniquely identified by its type (`Host`) and name
|
Each object is uniquely identified by its type (`Host`) and name
|
||||||
(`host1.example.org`). Objects can contain a comma-separated list of
|
(`host1.example.org`). Objects can contain a comma-separated list of
|
||||||
|
|
|
@ -352,9 +352,9 @@ object_declaration identifier T_STRING object_inherits_specifier expressionlist
|
||||||
|
|
||||||
item->SetType($3);
|
item->SetType($3);
|
||||||
|
|
||||||
if (strchr($4, ':') != NULL) {
|
if (strchr($4, '!') != NULL) {
|
||||||
std::ostringstream msgbuf;
|
std::ostringstream msgbuf;
|
||||||
msgbuf << "Name for object '" << $4 << "' of type '" << $3 << "' is invalid: Object names may not contain ':'";
|
msgbuf << "Name for object '" << $4 << "' of type '" << $3 << "' is invalid: Object names may not contain '!'";
|
||||||
free($3);
|
free($3);
|
||||||
BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str()));
|
BOOST_THROW_EXCEPTION(std::invalid_argument(msgbuf.str()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -152,7 +152,7 @@ void Host::UpdateSlaveServices(void)
|
||||||
ObjectLock olock(service_descriptions);
|
ObjectLock olock(service_descriptions);
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, service_descriptions) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, service_descriptions) {
|
||||||
std::ostringstream namebuf;
|
std::ostringstream namebuf;
|
||||||
namebuf << GetName() << ":" << kv.first;
|
namebuf << GetName() << "!" << kv.first;
|
||||||
String name = namebuf.str();
|
String name = namebuf.str();
|
||||||
|
|
||||||
std::vector<String> path;
|
std::vector<String> path;
|
||||||
|
|
|
@ -334,7 +334,7 @@ void Service::UpdateSlaveScheduledDowntimes(void)
|
||||||
|
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, descs) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, descs) {
|
||||||
std::ostringstream namebuf;
|
std::ostringstream namebuf;
|
||||||
namebuf << GetName() << ":" << kv.first;
|
namebuf << GetName() << "!" << kv.first;
|
||||||
String name = namebuf.str();
|
String name = namebuf.str();
|
||||||
|
|
||||||
std::vector<String> path;
|
std::vector<String> path;
|
||||||
|
|
|
@ -111,7 +111,7 @@ void Service::UpdateSlaveNotifications(void)
|
||||||
|
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, descs) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, descs) {
|
||||||
std::ostringstream namebuf;
|
std::ostringstream namebuf;
|
||||||
namebuf << GetName() << ":" << kv.first;
|
namebuf << GetName() << "!" << kv.first;
|
||||||
String name = namebuf.str();
|
String name = namebuf.str();
|
||||||
|
|
||||||
std::vector<String> path;
|
std::vector<String> path;
|
||||||
|
|
Loading…
Reference in New Issue