line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Cisco::ISE::InternalUser; |
2
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
27
|
|
3
|
1
|
|
|
1
|
|
5
|
use Moose; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
BEGIN { |
6
|
1
|
|
|
1
|
|
6375
|
use Exporter (); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
7
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS %actions); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
111
|
|
8
|
1
|
|
|
1
|
|
4
|
$VERSION = '0.05'; |
9
|
1
|
|
|
|
|
13
|
@ISA = qw(Exporter); |
10
|
1
|
|
|
|
|
3
|
@EXPORT = qw(); |
11
|
1
|
|
|
|
|
1
|
@EXPORT_OK = qw(); |
12
|
1
|
|
|
|
|
395
|
%EXPORT_TAGS = (); |
13
|
|
|
|
|
|
|
}; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
%actions = ( "query" => "/ers/config/internaluser/", |
16
|
|
|
|
|
|
|
"create" => "/ers/config/internaluser/", |
17
|
|
|
|
|
|
|
"update" => "/ers/config/internaluser/", |
18
|
|
|
|
|
|
|
"getById" => "/ers/config/internaluser/", |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# MOOSE! |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has 'email' => ( |
24
|
|
|
|
|
|
|
is => 'rw', |
25
|
|
|
|
|
|
|
isa => 'Any', |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
has 'firstName' => ( |
29
|
|
|
|
|
|
|
is => 'rw', |
30
|
|
|
|
|
|
|
isa => 'Any', |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
has 'lastName' => ( |
34
|
|
|
|
|
|
|
is => 'rw', |
35
|
|
|
|
|
|
|
isa => 'Any', |
36
|
|
|
|
|
|
|
); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
has 'id' => ( |
39
|
|
|
|
|
|
|
is => 'rw', |
40
|
|
|
|
|
|
|
isa => 'Any', |
41
|
|
|
|
|
|
|
); |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
has 'identityGroups' => ( |
44
|
|
|
|
|
|
|
is => 'rw', |
45
|
|
|
|
|
|
|
isa => 'Any', |
46
|
|
|
|
|
|
|
); |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
has 'name' => ( |
49
|
|
|
|
|
|
|
is => 'rw', |
50
|
|
|
|
|
|
|
isa => 'Any', |
51
|
|
|
|
|
|
|
); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
has 'changePassword' => ( |
54
|
|
|
|
|
|
|
is => 'ro', |
55
|
|
|
|
|
|
|
isa => 'Maybe[Str]', |
56
|
|
|
|
|
|
|
default => "", |
57
|
|
|
|
|
|
|
); |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
#has 'customAttributes' => ( |
60
|
|
|
|
|
|
|
# is => 'ro', |
61
|
|
|
|
|
|
|
# isa => 'ArrayRef', |
62
|
|
|
|
|
|
|
# auto_deref => '1', |
63
|
|
|
|
|
|
|
# ); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
has 'expiryDateEnabled' => ( |
66
|
|
|
|
|
|
|
is => 'rw', |
67
|
|
|
|
|
|
|
isa => 'Any', |
68
|
|
|
|
|
|
|
); |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
has 'expiryDate' => ( |
71
|
|
|
|
|
|
|
is => 'rw', |
72
|
|
|
|
|
|
|
isa => 'Any', |
73
|
|
|
|
|
|
|
); |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
has 'enablePassword' => ( |
76
|
|
|
|
|
|
|
is => 'rw', |
77
|
|
|
|
|
|
|
isa => 'Any', |
78
|
|
|
|
|
|
|
); |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
has 'enabled' => ( |
81
|
|
|
|
|
|
|
is => 'rw', |
82
|
|
|
|
|
|
|
isa => 'Any', |
83
|
|
|
|
|
|
|
); |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
has 'password' => ( |
86
|
|
|
|
|
|
|
is => 'rw', |
87
|
|
|
|
|
|
|
isa => 'Any', |
88
|
|
|
|
|
|
|
); |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
has 'passwordIDStore' => ( |
91
|
|
|
|
|
|
|
is => 'rw', |
92
|
|
|
|
|
|
|
isa => 'Any', |
93
|
|
|
|
|
|
|
); |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
# No Moose |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
sub toXML |
98
|
0
|
|
|
0
|
0
|
|
{ my $self = shift; |
99
|
0
|
|
|
|
|
|
my $id = $self->id; |
100
|
0
|
|
0
|
|
|
|
my $identitygroups = $self->identityGroups || ""; |
101
|
0
|
|
0
|
|
|
|
my $name = $self->name || ""; |
102
|
0
|
|
0
|
|
|
|
my $changepassword = $self->changePassword || "false"; |
103
|
0
|
|
0
|
|
|
|
my $enabled = $self->enabled || "true"; |
104
|
0
|
|
0
|
|
|
|
my $password = $self->password || ""; |
105
|
0
|
|
0
|
|
|
|
my $passwordidstore = $self->passwordIDStore || "Internal Users"; |
106
|
0
|
|
0
|
|
|
|
my $enablepassword = $self->enablePassword || ""; |
107
|
0
|
|
0
|
|
|
|
my $expirydate = $self->expiryDate || ""; |
108
|
0
|
|
0
|
|
|
|
my $expirydateenabled = $self->expiryDateEnabled || "false"; |
109
|
0
|
|
0
|
|
|
|
my $lastname = $self->lastName || ""; |
110
|
0
|
|
0
|
|
|
|
my $firstname = $self->firstName || ""; |
111
|
0
|
|
0
|
|
|
|
my $email = $self->email || ""; |
112
|
0
|
|
|
|
|
|
my $result = ""; |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
# <expiryDateEnabled>$expirydateenabled</expiryDateEnabled> |
115
|
|
|
|
|
|
|
# <expiryDate>$expirydate</expiryDate> |
116
|
|
|
|
|
|
|
# <passwordIDStore>$passwordidstore</passwordIDStore> |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
#<name>$name</name> |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
#if ($id) { $result = " <id>$id</id>\n"; } |
121
|
0
|
|
|
|
|
|
$result .= <<XML; |
122
|
|
|
|
|
|
|
<changePassword>$changepassword</changePassword> |
123
|
|
|
|
|
|
|
<customAttributes/> |
124
|
|
|
|
|
|
|
<email>$email</email> |
125
|
|
|
|
|
|
|
<enabled>$enabled</enabled> |
126
|
|
|
|
|
|
|
<firstName>$firstname</firstName> |
127
|
|
|
|
|
|
|
<identityGroups>$identitygroups</identityGroups> |
128
|
|
|
|
|
|
|
<lastName>$lastname</lastName> |
129
|
|
|
|
|
|
|
<password>$password</password> |
130
|
|
|
|
|
|
|
XML |
131
|
0
|
|
|
|
|
|
warn $result; |
132
|
0
|
|
|
|
|
|
return $result; |
133
|
|
|
|
|
|
|
} |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
sub header |
136
|
0
|
|
|
0
|
0
|
|
{ my $self = shift; |
137
|
0
|
|
|
|
|
|
my $data = shift; |
138
|
0
|
|
|
|
|
|
my $record = shift; |
139
|
0
|
0
|
|
|
|
|
my $name = " name=\"".$record->name."\"" if $record->name; |
140
|
0
|
0
|
|
|
|
|
my $id = " id=\"".$record->id."\"" if $record->id; |
141
|
0
|
|
0
|
|
|
|
$id ||= ""; |
142
|
0
|
|
|
|
|
|
my $description = " description=\"".$record->firstName." ".$record->lastName."\""; |
143
|
|
|
|
|
|
|
|
144
|
0
|
|
|
|
|
|
return qq{<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns3:internaluser$description$name$id xmlns:ns2="ers.ise.cisco.com" xmlns:ns3="identity.ers.ise.cisco.com">$data</ns3:internaluser>}; |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
} |
147
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
#################### main pod documentation end ################### |
149
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
1; |
152
|
|
|
|
|
|
|
# The preceding line will help the module return a true value |
153
|
|
|
|
|
|
|
|