Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Dictionary to reserved list #655

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

hp197
Copy link

@hp197 hp197 commented Mar 15, 2021

Without this Dictionary keyword gets quoted in (for example) assign.

Puppet
assign => 'typeof(host.vars.dict) == Dictionary'

Output before change (wrong):
assign where typeof(host.vars.dict) == "Dictionary"

Output after change (correct):
assign where typeof(host.vars.dict) == Dictionary

Signed-off-by: Henry Pauli [email protected]

Without this Dictionary keyword gets quoted in (for example) assign.

Puppet
`assign => 'typeof(host.vars.dict) == Dictionary'`

Output before change (wrong):
`assign where typeof(host.vars.dict) == "Dictionary"`

Output after change (correct):
`assign where typeof(host.vars.dict) == Dictionary`

Signed-off-by: Henry Pauli <[email protected]>
@lbetz
Copy link
Contributor

lbetz commented Mar 15, 2021

check, we should add other datatypes too.

@lbetz lbetz added the bug label Mar 15, 2021
@hp197
Copy link
Author

hp197 commented Mar 15, 2021

Quick search in the icinga2 source:

~/icinga2 master > grep -E 'DECLARE_OBJECT\(' * -R | sed -E 's/^.*DECLARE_OBJECT\((.*)\);$/\1/g'
CheckResultReader
StatusDataWriter
ExternalCommandListener
CompatLogger
CheckerComponent
NotificationComponent
GraphiteWriter
ElasticsearchWriter
OpenTsdbWriter
PerfdataWriter
GelfWriter
InfluxdbWriter
IcingaDB
DbConnection
TimePeriod
Downtime
CheckCommand
Host
Dependency
Service
User
IcingaApplication
Command
Checkable
Comment
EventCommand
HostGroup
ScheduledDowntime
ServiceGroup
CheckResult
UserGroup
NotificationCommand
CustomVarObject
Notification
LivestatusListener
IdoPgsqlConnection
Logger
Application
DateTime
Dictionary
Type
FileLogger
Function
Array
Configuration
Reference
StreamLogger
SyslogLogger
lib/base/object.hpp:#define DECLARE_OBJECT(klass) \
Namespace
ConfigObject
PerfdataValue
IdoMysqlConnection
ApiUser
Endpoint
ApiListener
Zone
Missing: CheckResultReader
Missing: StatusDataWriter
Missing: ExternalCommandListener
Missing: CompatLogger
Missing: CheckerComponent
Missing: NotificationComponent
Missing: GraphiteWriter
Missing: ElasticsearchWriter
Missing: OpenTsdbWriter
Missing: PerfdataWriter
Missing: GelfWriter
Missing: InfluxdbWriter
Missing: IcingaDB
Missing: DbConnection
Missing: TimePeriod
Missing: CheckCommand
Missing: Dependency
Missing: IcingaApplication
Missing: Command
Missing: Checkable
Missing: Comment
Missing: EventCommand
Missing: HostGroup
Missing: ScheduledDowntime
Missing: ServiceGroup
Missing: CheckResult
Missing: UserGroup
Missing: NotificationCommand
Missing: CustomVarObject
Missing: Notification
Missing: LivestatusListener
Missing: IdoPgsqlConnection
Missing: Logger
Missing: DateTime
Missing: Dictionary
Missing: FileLogger
Missing: Function
Missing: Array
Missing: Configuration
Missing: Reference
Missing: StreamLogger
Missing: SyslogLogger
Missing: Namespace
Missing: ConfigObject
Missing: PerfdataValue
Missing: IdoMysqlConnection
Missing: ApiUser
Missing: Endpoint
Missing: ApiListener

Do you want them all added?

@lbetz
Copy link
Contributor

lbetz commented Mar 15, 2021

Grr, I meant datatypes like Dictonary, Array, Float, ... but ok, the object types themself, hm I'm not sure.

@lbetz
Copy link
Contributor

lbetz commented Apr 20, 2021

We can't add object types to the list. E.g.

get_object("Endpoint", host.name)

wouldn't be worked anymore.

@lbetz
Copy link
Contributor

lbetz commented Apr 20, 2021

We'll check this list...

Command
Checkable
Comment
CustomVarObject
Logger
DateTime
Dictionary
Type
Function
Array
Configuration
Reference
StreamLogger
Namespace
ConfigObject
PerfdataValue

@lbetz lbetz merged commit c0a6786 into voxpupuli:master Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants