@@ -91,72 +91,59 @@ class {{ resource|capitalize }}(ConfigBase, {{ resource|capitalize }}Args):
91
91
"""
92
92
state = self ._module .params ['state' ]
93
93
if state == 'overridden' :
94
- commands = self ._state_overridden (want , have )
94
+ kwargs = {}
95
+ commands = self ._state_overridden (** kwargs )
95
96
elif state == 'deleted' :
96
- commands = self ._state_deleted (want , have )
97
+ kwargs = {}
98
+ commands = self ._state_deleted (** kwargs )
97
99
elif state == 'merged' :
98
- commands = self ._state_merged (want , have )
100
+ kwargs = {}
101
+ commands = self ._state_merged (** kwargs )
99
102
elif state == 'replaced' :
100
- commands = self ._state_replaced (want , have )
103
+ kwargs = {}
104
+ commands = self ._state_replaced (** kwargs )
101
105
return commands
102
106
103
107
@staticmethod
104
- def _state_replaced (want , have ):
108
+ def _state_replaced (self , ** kwargs ):
105
109
""" The command generator when state is replaced
106
110
107
- :param want: the desired configuration as a dictionary
108
- :param have: the current configuration as a dictionary
109
111
:rtype: A list
110
112
:returns: the commands necessary to migrate the current configuration
111
113
to the deisred configuration
112
114
"""
113
- if want != have :
114
- # compare and generate command set
115
- pass
116
115
commands = []
117
116
return commands
118
117
119
118
@staticmethod
120
- def _state_overridden (want , have ):
119
+ def _state_overridden (self , ** kwargs ):
121
120
""" The command generator when state is overridden
122
121
123
- :param want: the desired configuration as a dictionary
124
- :param have: the current configuration as a dictionary
125
122
:rtype: A list
126
123
:returns: the commands necessary to migrate the current configuration
127
124
to the deisred configuration
128
125
"""
129
- if want != have :
130
- pass
131
126
commands = []
132
127
return commands
133
128
134
129
@staticmethod
135
- def _state_merged (want , have ):
130
+ def _state_merged (self , ** kwargs ):
136
131
""" The command generator when state is merged
137
132
138
- :param want: the additive configuration as a dictionary
139
- :param have: the current configuration as a dictionary
140
133
:rtype: A list
141
134
:returns: the commands necessary to merge the provided into
142
135
the current configuration
143
136
"""
144
- if want != have :
145
- pass
146
137
commands = []
147
138
return commands
148
139
149
140
@staticmethod
150
- def _state_deleted (want , have ):
141
+ def _state_deleted (self , ** kwargs ):
151
142
""" The command generator when state is deleted
152
143
153
- :param want: the objects from which the configuration should be removed
154
- :param have: the current configuration as a dictionary
155
144
:rtype: A list
156
145
:returns: the commands necessary to remove the current configuration
157
146
of the provided objects
158
147
"""
159
- if want != have :
160
- pass
161
148
commands = []
162
149
return commands
0 commit comments