1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
.. _cpm_user_module:
cpm_user -- Get various status and parameters from WTI OOB and PDU devices
==========================================================================
.. contents::
:local:
:depth: 1
Synopsis
--------
Get/Add/Edit Delete Users from WTI OOB and PDU devices
Parameters
----------
cpm_action (True, str, None)
This is the Action to send the module.
cpm_url (True, str, None)
This is the URL of the WTI device to send the module.
cpm_username (True, str, None)
This is the Basic Authentication Username of the WTI device to send the module.
cpm_password (True, str, None)
This is the Basic Authentication Password of the WTI device to send the module.
use_https (False, bool, True)
Designates to use an https connection or http connection.
validate_certs (False, bool, True)
If false, SSL certificates will not be validated. This should only be used
on personally controlled sites using self-signed certificates.
use_proxy (False, bool, False)
Flag to control if the lookup will observe HTTP proxy environment variables when present.
user_name (True, str, None)
This is the User Name that needs to be create/modified/deleted
user_pass (False, str, None)
This is the User Password that needs to be create/modified/deleted
If the user is being Created this parameter is required
user_accesslevel (False, int, None)
This is the access level that needs to be create/modified/deleted
0 View, 1 User, 2 SuperUser, 3 Administrator
user_accessssh (False, int, None)
If the user has access to the WTI device via SSH
0 No , 1 Yes
user_accessserial (False, int, None)
If the user has access to the WTI device via Serial ports
0 No , 1 Yes
user_accessweb (False, int, None)
If the user has access to the WTI device via Web
0 No , 1 Yes
user_accessapi (False, int, None)
If the user has access to the WTI device via RESTful APIs
0 No , 1 Yes
user_accessmonitor (False, int, None)
If the user has ability to monitor connection sessions
0 No , 1 Yes
user_accessoutbound (False, int, None)
If the user has ability to initiate Outbound connection
0 No , 1 Yes
user_portaccess (False, str, None)
If AccessLevel is lower than Administrator, which ports the user has access
user_plugaccess (False, str, None)
If AccessLevel is lower than Administrator, which plugs the user has access
user_groupaccess (False, str, None)
If AccessLevel is lower than Administrator, which Groups the user has access
user_callbackphone (False, str, None)
This is the Call Back phone number used for POTS modem connections
Examples
--------
.. code-block:: yaml+jinja
# Get User Parameters
- name: Get the User Parameters for the given user of a WTI device
cpm_user:
cpm_action: "getuser"
cpm_url: "rest.wti.com"
cpm_username: "restuser"
cpm_password: "restfuluserpass12"
use_https: true
validate_certs: true
user_name: "usernumberone"
# Create User
- name: Create a User on a given WTI device
cpm_user:
cpm_action: "adduser"
cpm_url: "rest.wti.com"
cpm_username: "restuser"
cpm_password: "restfuluserpass12"
use_https: true
validate_certs: false
user_name: "usernumberone"
user_pass: "complicatedpassword"
user_accesslevel: 2
user_accessssh: 1
user_accessserial: 1
user_accessweb: 0
user_accessapi: 1
user_accessmonitor: 0
user_accessoutbound: 0
user_portaccess: "10011111"
user_plugaccess: "00000111"
user_groupaccess: "00000000"
# Edit User
- name: Edit a User on a given WTI device
cpm_user:
cpm_action: "edituser"
cpm_url: "rest.wti.com"
cpm_username: "restuser"
cpm_password: "restfuluserpass12"
use_https: true
validate_certs: false
user_name: "usernumberone"
user_pass: "newpasswordcomplicatedpassword"
# Delete User
- name: Delete a User from a given WTI device
cpm_user:
cpm_action: "deleteuser"
cpm_url: "rest.wti.com"
cpm_username: "restuser"
cpm_password: "restfuluserpass12"
use_https: true
validate_certs: true
user_name: "usernumberone"
Return Values
-------------
data (always, str, )
The output JSON returned from the commands sent
Status
------
- This module is not guaranteed to have a backwards compatible interface. *[preview]*
- This module is maintained by community.
Authors
~~~~~~~
- Western Telematic Inc. (@wtinetworkgear)
|