| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Net::Checkpoint::Management::v1; |
|
2
|
|
|
|
|
|
|
$Net::Checkpoint::Management::v1::VERSION = '0.004002'; |
|
3
|
|
|
|
|
|
|
# ABSTRACT: Checkpoint Management API version 1.x client library |
|
4
|
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
521565
|
use 5.024; |
|
|
2
|
|
|
|
|
8
|
|
|
6
|
2
|
|
|
2
|
|
1407
|
use Moo; |
|
|
2
|
|
|
|
|
18257
|
|
|
|
2
|
|
|
|
|
14
|
|
|
7
|
2
|
|
|
2
|
|
3328
|
use feature 'signatures'; |
|
|
2
|
|
|
|
|
10
|
|
|
|
2
|
|
|
|
|
403
|
|
|
8
|
2
|
|
|
2
|
|
2265
|
use Types::Standard qw( ArrayRef Str ); |
|
|
2
|
|
|
|
|
304654
|
|
|
|
2
|
|
|
|
|
49
|
|
|
9
|
2
|
|
|
2
|
|
54941
|
use Carp::Clan qw(^Net::Checkpoint::Management::v1); |
|
|
2
|
|
|
|
|
4750
|
|
|
|
2
|
|
|
|
|
15
|
|
|
10
|
2
|
|
|
2
|
|
1490
|
use Clone qw( clone ); |
|
|
2
|
|
|
|
|
1170
|
|
|
|
2
|
|
|
|
|
177
|
|
|
11
|
2
|
|
|
2
|
|
18
|
use List::Util qw( first ); |
|
|
2
|
|
|
|
|
8
|
|
|
|
2
|
|
|
|
|
177
|
|
|
12
|
2
|
|
|
2
|
|
1535
|
use Net::Checkpoint::Management::v1::Role::ObjectMethods; |
|
|
2
|
|
|
|
|
8
|
|
|
|
2
|
|
|
|
|
95
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
2
|
|
|
2
|
|
14
|
no warnings "experimental::signatures"; |
|
|
2
|
|
|
|
|
4
|
|
|
|
2
|
|
|
|
|
4979
|
|
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
has 'user' => ( |
|
18
|
|
|
|
|
|
|
isa => Str, |
|
19
|
|
|
|
|
|
|
is => 'ro', |
|
20
|
|
|
|
|
|
|
); |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has 'passwd' => ( |
|
24
|
|
|
|
|
|
|
isa => Str, |
|
25
|
|
|
|
|
|
|
is => 'ro', |
|
26
|
|
|
|
|
|
|
); |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has 'api_key' => ( |
|
30
|
|
|
|
|
|
|
isa => Str, |
|
31
|
|
|
|
|
|
|
is => 'ro', |
|
32
|
|
|
|
|
|
|
predicate => '_has_api_key', |
|
33
|
|
|
|
|
|
|
); |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
has 'api_versions' => ( |
|
37
|
|
|
|
|
|
|
is => 'lazy', |
|
38
|
|
|
|
|
|
|
isa => ArrayRef[Str], |
|
39
|
|
|
|
|
|
|
); |
|
40
|
|
|
|
|
|
|
|
|
41
|
0
|
|
|
0
|
|
|
sub _build_api_versions ($self) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
my $res_versions = $self->post('/web_api/v1.1/show-api-versions', {}); |
|
43
|
0
|
|
|
|
|
|
return $res_versions->data->{'supported-versions'}; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
has 'api_version' => ( |
|
48
|
|
|
|
|
|
|
is => 'rw', |
|
49
|
|
|
|
|
|
|
isa => Str, |
|
50
|
|
|
|
|
|
|
); |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
with 'Net::Checkpoint::Management::v1::Role::REST::Client'; |
|
53
|
|
|
|
|
|
|
|
|
54
|
0
|
|
|
0
|
|
|
sub _error_handler ($self, $data) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
55
|
0
|
|
|
|
|
|
my $error_message; |
|
56
|
|
|
|
|
|
|
|
|
57
|
0
|
0
|
|
|
|
|
if (ref $data eq 'HASH' ) { |
|
58
|
0
|
0
|
0
|
|
|
|
if (exists $data->{'blocking-errors'} |
|
|
|
0
|
0
|
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
59
|
|
|
|
|
|
|
&& ref $data->{'blocking-errors'} eq 'ARRAY' |
|
60
|
|
|
|
|
|
|
&& exists $data->{'blocking-errors'}->[0] |
|
61
|
|
|
|
|
|
|
&& exists $data->{'blocking-errors'}->[0]->{message}) { |
|
62
|
0
|
|
|
|
|
|
$error_message = $data->{'blocking-errors'}->[0]->{message}; |
|
63
|
|
|
|
|
|
|
} |
|
64
|
|
|
|
|
|
|
elsif (exists $data->{errors} |
|
65
|
|
|
|
|
|
|
&& ref $data->{errors} eq 'ARRAY' |
|
66
|
|
|
|
|
|
|
&& exists $data->{errors}->[0] |
|
67
|
|
|
|
|
|
|
&& exists $data->{errors}->[0]->{message}) { |
|
68
|
0
|
|
|
|
|
|
$error_message = $data->{errors}->[0]->{message}; |
|
69
|
|
|
|
|
|
|
} |
|
70
|
|
|
|
|
|
|
# when ignore-warnings isn't passed to the API call, a response with only |
|
71
|
|
|
|
|
|
|
# warnings is also considered an error because its changes aren't saved |
|
72
|
|
|
|
|
|
|
# when passing ignore-warnings the error handler isn't called because the |
|
73
|
|
|
|
|
|
|
# http response code is 200 |
|
74
|
|
|
|
|
|
|
elsif (exists $data->{warnings} |
|
75
|
|
|
|
|
|
|
&& ref $data->{warnings} eq 'ARRAY' |
|
76
|
|
|
|
|
|
|
&& exists $data->{warnings}->[0] |
|
77
|
|
|
|
|
|
|
&& exists $data->{warnings}->[0]->{message}) { |
|
78
|
0
|
|
|
|
|
|
$error_message = $data->{warnings}->[0]->{message}; |
|
79
|
|
|
|
|
|
|
} |
|
80
|
|
|
|
|
|
|
else { |
|
81
|
0
|
|
|
|
|
|
$error_message = $data->{message}; |
|
82
|
|
|
|
|
|
|
} |
|
83
|
|
|
|
|
|
|
} |
|
84
|
|
|
|
|
|
|
# underlying exception like Could not connect to 'cpmanager.example.org' |
|
85
|
|
|
|
|
|
|
else { |
|
86
|
0
|
|
|
|
|
|
$error_message = $data; |
|
87
|
|
|
|
|
|
|
} |
|
88
|
0
|
|
|
|
|
|
croak($error_message); |
|
89
|
|
|
|
|
|
|
} |
|
90
|
|
|
|
|
|
|
|
|
91
|
0
|
|
|
0
|
|
|
sub _create ($self, $url, $object_data, $query_params = {}) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
92
|
0
|
|
|
|
|
|
my $params = $self->user_agent->www_form_urlencode( $query_params ); |
|
93
|
0
|
|
|
|
|
|
my $res = $self->post("$url?$params", $object_data); |
|
94
|
0
|
|
|
|
|
|
my $code = $res->code; |
|
95
|
0
|
|
|
|
|
|
my $data = $res->data; |
|
96
|
|
|
|
|
|
|
|
|
97
|
0
|
0
|
|
|
|
|
$self->_error_handler($data) |
|
98
|
|
|
|
|
|
|
unless $code == 200; |
|
99
|
0
|
|
|
|
|
|
return $data; |
|
100
|
|
|
|
|
|
|
} |
|
101
|
|
|
|
|
|
|
|
|
102
|
0
|
|
|
0
|
|
|
sub _list ($self, $url, $list_key, $query_params = {}) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
# the API only allows 500 objects at a time |
|
104
|
|
|
|
|
|
|
# work around that by making multiple API calls |
|
105
|
0
|
|
|
|
|
|
my $offset = 0; |
|
106
|
|
|
|
|
|
|
my $limit = exists $query_params->{limit} |
|
107
|
|
|
|
|
|
|
? $query_params->{limit} |
|
108
|
0
|
0
|
|
|
|
|
: 500; |
|
109
|
0
|
|
|
|
|
|
my $more_data_available = 1; |
|
110
|
0
|
|
|
|
|
|
my $response; |
|
111
|
0
|
|
|
|
|
|
while ($more_data_available) { |
|
112
|
0
|
|
|
|
|
|
my $res = $self->post($url, { |
|
113
|
|
|
|
|
|
|
offset => $offset, |
|
114
|
|
|
|
|
|
|
limit => $limit, |
|
115
|
|
|
|
|
|
|
%$query_params, |
|
116
|
|
|
|
|
|
|
}); |
|
117
|
0
|
|
|
|
|
|
my $code = $res->code; |
|
118
|
0
|
|
|
|
|
|
my $data = $res->data; |
|
119
|
0
|
0
|
|
|
|
|
$self->_error_handler($data) |
|
120
|
|
|
|
|
|
|
unless $code == 200; |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
# use first response for base structure of response |
|
123
|
0
|
0
|
|
|
|
|
if ($offset == 0) { |
|
124
|
0
|
|
|
|
|
|
$response = clone($data); |
|
125
|
0
|
|
|
|
|
|
delete $response->{from}; |
|
126
|
0
|
|
|
|
|
|
delete $response->{to}; |
|
127
|
|
|
|
|
|
|
} |
|
128
|
|
|
|
|
|
|
else { |
|
129
|
|
|
|
|
|
|
push $response->{$list_key}->@*, $data->{$list_key}->@* |
|
130
|
0
|
0
|
0
|
|
|
|
if exists $data->{$list_key} && ref $data->{$list_key} eq 'ARRAY'; |
|
131
|
|
|
|
|
|
|
} |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
# check if more data is available |
|
134
|
0
|
0
|
|
|
|
|
if ($offset + $limit < $data->{total}) { |
|
135
|
0
|
|
|
|
|
|
$more_data_available = 1; |
|
136
|
0
|
|
|
|
|
|
$offset += $limit; |
|
137
|
|
|
|
|
|
|
} |
|
138
|
|
|
|
|
|
|
else { |
|
139
|
0
|
|
|
|
|
|
$more_data_available = 0; |
|
140
|
|
|
|
|
|
|
} |
|
141
|
|
|
|
|
|
|
} |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
# return response similar to Checkpoint API |
|
144
|
0
|
|
|
|
|
|
return $response; |
|
145
|
|
|
|
|
|
|
} |
|
146
|
|
|
|
|
|
|
|
|
147
|
0
|
|
|
0
|
|
|
sub _get ($self, $url, $query_params = {}) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
148
|
0
|
|
|
|
|
|
my $res = $self->post($url, $query_params); |
|
149
|
0
|
|
|
|
|
|
my $code = $res->code; |
|
150
|
0
|
|
|
|
|
|
my $data = $res->data; |
|
151
|
|
|
|
|
|
|
|
|
152
|
0
|
0
|
|
|
|
|
$self->_error_handler($data) |
|
153
|
|
|
|
|
|
|
unless $code == 200; |
|
154
|
|
|
|
|
|
|
|
|
155
|
0
|
|
|
|
|
|
return $data; |
|
156
|
|
|
|
|
|
|
} |
|
157
|
|
|
|
|
|
|
|
|
158
|
0
|
|
|
0
|
|
|
sub _update ($self, $url, $object_data) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
159
|
0
|
|
|
|
|
|
my $res = $self->post($url, $object_data); |
|
160
|
0
|
|
|
|
|
|
my $code = $res->code; |
|
161
|
0
|
|
|
|
|
|
my $data = $res->data; |
|
162
|
0
|
0
|
|
|
|
|
$self->_error_handler($data) |
|
163
|
|
|
|
|
|
|
unless $code == 200; |
|
164
|
|
|
|
|
|
|
|
|
165
|
0
|
|
|
|
|
|
return $data; |
|
166
|
|
|
|
|
|
|
} |
|
167
|
|
|
|
|
|
|
|
|
168
|
0
|
|
|
0
|
|
|
sub _delete ($self, $url, $object) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
169
|
0
|
|
|
|
|
|
my $res = $self->post($url, $object); |
|
170
|
0
|
|
|
|
|
|
my $code = $res->code; |
|
171
|
0
|
|
|
|
|
|
my $data = $res->data; |
|
172
|
0
|
0
|
|
|
|
|
$self->_error_handler($data) |
|
173
|
|
|
|
|
|
|
unless $code == 200; |
|
174
|
|
|
|
|
|
|
|
|
175
|
0
|
|
|
|
|
|
return 1; |
|
176
|
|
|
|
|
|
|
} |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
Net::Checkpoint::Management::v1::Role::ObjectMethods->apply([ |
|
180
|
|
|
|
|
|
|
{ |
|
181
|
|
|
|
|
|
|
object => 'packages', |
|
182
|
|
|
|
|
|
|
singular => 'package', |
|
183
|
|
|
|
|
|
|
create => 'add-package', |
|
184
|
|
|
|
|
|
|
list => 'show-packages', |
|
185
|
|
|
|
|
|
|
get => 'show-package', |
|
186
|
|
|
|
|
|
|
update => 'set-package', |
|
187
|
|
|
|
|
|
|
delete => 'delete-package', |
|
188
|
|
|
|
|
|
|
list_key => 'packages', |
|
189
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
190
|
|
|
|
|
|
|
}, |
|
191
|
|
|
|
|
|
|
{ |
|
192
|
|
|
|
|
|
|
object => 'accessrules', |
|
193
|
|
|
|
|
|
|
singular => 'accessrule', |
|
194
|
|
|
|
|
|
|
create => 'add-access-rule', |
|
195
|
|
|
|
|
|
|
list => 'show-access-rulebase', |
|
196
|
|
|
|
|
|
|
get => 'show-access-rule', |
|
197
|
|
|
|
|
|
|
update => 'set-access-rule', |
|
198
|
|
|
|
|
|
|
delete => 'delete-access-rule', |
|
199
|
|
|
|
|
|
|
list_key => 'rulebase', |
|
200
|
|
|
|
|
|
|
id_keys => ['uid', 'name', 'rule-number'], |
|
201
|
|
|
|
|
|
|
}, |
|
202
|
|
|
|
|
|
|
{ |
|
203
|
|
|
|
|
|
|
object => 'networks', |
|
204
|
|
|
|
|
|
|
singular => 'network', |
|
205
|
|
|
|
|
|
|
create => 'add-network', |
|
206
|
|
|
|
|
|
|
list => 'show-networks', |
|
207
|
|
|
|
|
|
|
get => 'show-network', |
|
208
|
|
|
|
|
|
|
update => 'set-network', |
|
209
|
|
|
|
|
|
|
delete => 'delete-network', |
|
210
|
|
|
|
|
|
|
list_key => 'objects', |
|
211
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
212
|
|
|
|
|
|
|
}, |
|
213
|
|
|
|
|
|
|
{ |
|
214
|
|
|
|
|
|
|
object => 'hosts', |
|
215
|
|
|
|
|
|
|
singular => 'host', |
|
216
|
|
|
|
|
|
|
create => 'add-host', |
|
217
|
|
|
|
|
|
|
list => 'show-hosts', |
|
218
|
|
|
|
|
|
|
get => 'show-host', |
|
219
|
|
|
|
|
|
|
update => 'set-host', |
|
220
|
|
|
|
|
|
|
delete => 'delete-host', |
|
221
|
|
|
|
|
|
|
list_key => 'objects', |
|
222
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
223
|
|
|
|
|
|
|
}, |
|
224
|
|
|
|
|
|
|
{ |
|
225
|
|
|
|
|
|
|
object => 'address_ranges', |
|
226
|
|
|
|
|
|
|
singular => 'address_range', |
|
227
|
|
|
|
|
|
|
create => 'add-address-range', |
|
228
|
|
|
|
|
|
|
list => 'show-address-ranges', |
|
229
|
|
|
|
|
|
|
get => 'show-address-range', |
|
230
|
|
|
|
|
|
|
update => 'set-address-range', |
|
231
|
|
|
|
|
|
|
delete => 'delete-address-range', |
|
232
|
|
|
|
|
|
|
list_key => 'objects', |
|
233
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
234
|
|
|
|
|
|
|
}, |
|
235
|
|
|
|
|
|
|
{ |
|
236
|
|
|
|
|
|
|
object => 'dns_domains', |
|
237
|
|
|
|
|
|
|
singular => 'dns_domain', |
|
238
|
|
|
|
|
|
|
create => 'add-dns-domain', |
|
239
|
|
|
|
|
|
|
list => 'show-dns-domains', |
|
240
|
|
|
|
|
|
|
get => 'show-dns-domain', |
|
241
|
|
|
|
|
|
|
update => 'set-dns-domain', |
|
242
|
|
|
|
|
|
|
delete => 'delete-dns-domain', |
|
243
|
|
|
|
|
|
|
list_key => 'objects', |
|
244
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
245
|
|
|
|
|
|
|
}, |
|
246
|
|
|
|
|
|
|
{ |
|
247
|
|
|
|
|
|
|
object => 'groups', |
|
248
|
|
|
|
|
|
|
singular => 'group', |
|
249
|
|
|
|
|
|
|
create => 'add-group', |
|
250
|
|
|
|
|
|
|
list => 'show-groups', |
|
251
|
|
|
|
|
|
|
get => 'show-group', |
|
252
|
|
|
|
|
|
|
update => 'set-group', |
|
253
|
|
|
|
|
|
|
delete => 'delete-group', |
|
254
|
|
|
|
|
|
|
list_key => 'objects', |
|
255
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
256
|
|
|
|
|
|
|
}, |
|
257
|
|
|
|
|
|
|
{ |
|
258
|
|
|
|
|
|
|
object => 'access_roles', |
|
259
|
|
|
|
|
|
|
singular => 'access_role', |
|
260
|
|
|
|
|
|
|
create => 'add-access-role', |
|
261
|
|
|
|
|
|
|
list => 'show-access-roles', |
|
262
|
|
|
|
|
|
|
get => 'show-access-role', |
|
263
|
|
|
|
|
|
|
update => 'set-access-role', |
|
264
|
|
|
|
|
|
|
delete => 'delete-access-role', |
|
265
|
|
|
|
|
|
|
list_key => 'objects', |
|
266
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
267
|
|
|
|
|
|
|
}, |
|
268
|
|
|
|
|
|
|
{ |
|
269
|
|
|
|
|
|
|
object => 'services_tcp', |
|
270
|
|
|
|
|
|
|
singular => 'service_tcp', |
|
271
|
|
|
|
|
|
|
create => 'add-service-tcp', |
|
272
|
|
|
|
|
|
|
list => 'show-services-tcp', |
|
273
|
|
|
|
|
|
|
get => 'show-service-tcp', |
|
274
|
|
|
|
|
|
|
update => 'set-service-tcp', |
|
275
|
|
|
|
|
|
|
delete => 'delete-service-tcp', |
|
276
|
|
|
|
|
|
|
list_key => 'objects', |
|
277
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
278
|
|
|
|
|
|
|
}, |
|
279
|
|
|
|
|
|
|
{ |
|
280
|
|
|
|
|
|
|
object => 'services_udp', |
|
281
|
|
|
|
|
|
|
singular => 'service_udp', |
|
282
|
|
|
|
|
|
|
create => 'add-service-udp', |
|
283
|
|
|
|
|
|
|
list => 'show-services-udp', |
|
284
|
|
|
|
|
|
|
get => 'show-service-udp', |
|
285
|
|
|
|
|
|
|
update => 'set-service-udp', |
|
286
|
|
|
|
|
|
|
delete => 'delete-service-udp', |
|
287
|
|
|
|
|
|
|
list_key => 'objects', |
|
288
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
289
|
|
|
|
|
|
|
}, |
|
290
|
|
|
|
|
|
|
{ |
|
291
|
|
|
|
|
|
|
object => 'services_icmp', |
|
292
|
|
|
|
|
|
|
singular => 'service_icmp', |
|
293
|
|
|
|
|
|
|
create => 'add-service-icmp', |
|
294
|
|
|
|
|
|
|
list => 'show-services-icmp', |
|
295
|
|
|
|
|
|
|
get => 'show-service-icmp', |
|
296
|
|
|
|
|
|
|
update => 'set-service-icmp', |
|
297
|
|
|
|
|
|
|
delete => 'delete-service-icmp', |
|
298
|
|
|
|
|
|
|
list_key => 'objects', |
|
299
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
300
|
|
|
|
|
|
|
}, |
|
301
|
|
|
|
|
|
|
{ |
|
302
|
|
|
|
|
|
|
object => 'services_icmpv6', |
|
303
|
|
|
|
|
|
|
singular => 'service_icmpv6', |
|
304
|
|
|
|
|
|
|
create => 'add-service-icmp6', |
|
305
|
|
|
|
|
|
|
list => 'show-services-icmp6', |
|
306
|
|
|
|
|
|
|
get => 'show-service-icmp6', |
|
307
|
|
|
|
|
|
|
update => 'set-service-icmp6', |
|
308
|
|
|
|
|
|
|
delete => 'delete-service-icmp6', |
|
309
|
|
|
|
|
|
|
list_key => 'objects', |
|
310
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
311
|
|
|
|
|
|
|
}, |
|
312
|
|
|
|
|
|
|
{ |
|
313
|
|
|
|
|
|
|
object => 'services_other', |
|
314
|
|
|
|
|
|
|
singular => 'service_other', |
|
315
|
|
|
|
|
|
|
create => 'add-service-other', |
|
316
|
|
|
|
|
|
|
list => 'show-services-other', |
|
317
|
|
|
|
|
|
|
get => 'show-service-other', |
|
318
|
|
|
|
|
|
|
update => 'set-service-other', |
|
319
|
|
|
|
|
|
|
delete => 'delete-service-other', |
|
320
|
|
|
|
|
|
|
list_key => 'objects', |
|
321
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
322
|
|
|
|
|
|
|
}, |
|
323
|
|
|
|
|
|
|
{ |
|
324
|
|
|
|
|
|
|
object => 'service_groups', |
|
325
|
|
|
|
|
|
|
singular => 'service_group', |
|
326
|
|
|
|
|
|
|
create => 'add-service-group', |
|
327
|
|
|
|
|
|
|
list => 'show-service-groups', |
|
328
|
|
|
|
|
|
|
get => 'show-service-group', |
|
329
|
|
|
|
|
|
|
update => 'set-service-group', |
|
330
|
|
|
|
|
|
|
delete => 'delete-service-group', |
|
331
|
|
|
|
|
|
|
list_key => 'objects', |
|
332
|
|
|
|
|
|
|
id_keys => [qw( uid name )], |
|
333
|
|
|
|
|
|
|
}, |
|
334
|
|
|
|
|
|
|
{ |
|
335
|
|
|
|
|
|
|
object => 'sessions', |
|
336
|
|
|
|
|
|
|
singular => 'session', |
|
337
|
|
|
|
|
|
|
list => 'show-sessions', |
|
338
|
|
|
|
|
|
|
get => 'show-session', |
|
339
|
|
|
|
|
|
|
update => 'set-session', |
|
340
|
|
|
|
|
|
|
list_key => 'objects', |
|
341
|
|
|
|
|
|
|
}, |
|
342
|
|
|
|
|
|
|
{ |
|
343
|
|
|
|
|
|
|
object => 'tasks', |
|
344
|
|
|
|
|
|
|
singular => 'task', |
|
345
|
|
|
|
|
|
|
list => 'show-tasks', |
|
346
|
|
|
|
|
|
|
get => 'show-task', |
|
347
|
|
|
|
|
|
|
list_key => 'tasks', |
|
348
|
|
|
|
|
|
|
}, |
|
349
|
|
|
|
|
|
|
]); |
|
350
|
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
|
|
352
|
0
|
|
|
0
|
1
|
|
sub login($self, $params = undef) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
353
|
0
|
|
|
|
|
|
my %login_params; |
|
354
|
|
|
|
|
|
|
|
|
355
|
0
|
0
|
|
|
|
|
%login_params = ($params->%*) |
|
356
|
|
|
|
|
|
|
if $params; |
|
357
|
|
|
|
|
|
|
|
|
358
|
0
|
0
|
|
|
|
|
if ($self->_has_api_key) { |
|
359
|
0
|
|
|
|
|
|
%login_params = ( |
|
360
|
|
|
|
|
|
|
%login_params, |
|
361
|
|
|
|
|
|
|
'api-key' => $self->api_key, |
|
362
|
|
|
|
|
|
|
); |
|
363
|
|
|
|
|
|
|
} |
|
364
|
|
|
|
|
|
|
else { |
|
365
|
0
|
|
|
|
|
|
%login_params = ( |
|
366
|
|
|
|
|
|
|
%login_params, |
|
367
|
|
|
|
|
|
|
user => $self->user, |
|
368
|
|
|
|
|
|
|
password => $self->passwd, |
|
369
|
|
|
|
|
|
|
); |
|
370
|
|
|
|
|
|
|
} |
|
371
|
|
|
|
|
|
|
|
|
372
|
0
|
|
|
|
|
|
my $res = $self->post('/web_api/v1/login', \%login_params); |
|
373
|
0
|
0
|
|
|
|
|
if ($res->code == 200) { |
|
374
|
0
|
|
|
|
|
|
my $api_version = $res->data->{'api-server-version'}; |
|
375
|
0
|
|
|
|
|
|
$self->api_version($api_version); |
|
376
|
|
|
|
|
|
|
$self->set_persistent_header('X-chkp-sid', |
|
377
|
0
|
|
|
|
|
|
$res->data->{sid}); |
|
378
|
|
|
|
|
|
|
} |
|
379
|
|
|
|
|
|
|
else { |
|
380
|
0
|
|
|
|
|
|
$self->_error_handler($res->data); |
|
381
|
|
|
|
|
|
|
} |
|
382
|
|
|
|
|
|
|
} |
|
383
|
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
|
|
385
|
0
|
|
|
0
|
1
|
|
sub logout($self) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
386
|
0
|
|
|
|
|
|
my $res = $self->post('/web_api/v1/logout', {}); |
|
387
|
0
|
|
|
|
|
|
my $code = $res->code; |
|
388
|
0
|
|
|
|
|
|
my $data = $res->data; |
|
389
|
0
|
0
|
|
|
|
|
$self->_error_handler($data) |
|
390
|
|
|
|
|
|
|
unless $code == 200; |
|
391
|
|
|
|
|
|
|
} |
|
392
|
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
|
|
394
|
0
|
|
|
0
|
1
|
|
sub publish($self) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
395
|
0
|
|
|
|
|
|
my $res = $self->post('/web_api/v' . $self->api_version . '/publish', {}); |
|
396
|
0
|
|
|
|
|
|
my $code = $res->code; |
|
397
|
0
|
|
|
|
|
|
my $data = $res->data; |
|
398
|
0
|
0
|
|
|
|
|
$self->_error_handler($data) |
|
399
|
|
|
|
|
|
|
unless $code == 200; |
|
400
|
|
|
|
|
|
|
|
|
401
|
0
|
|
|
|
|
|
return $data->{'task-id'}; |
|
402
|
|
|
|
|
|
|
} |
|
403
|
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
|
|
405
|
0
|
|
|
0
|
1
|
|
sub discard($self) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
406
|
0
|
|
|
|
|
|
my $res = $self->post('/web_api/v' . $self->api_version . '/discard', {}); |
|
407
|
0
|
|
|
|
|
|
my $code = $res->code; |
|
408
|
0
|
|
|
|
|
|
my $data = $res->data; |
|
409
|
0
|
0
|
|
|
|
|
$self->_error_handler($data) |
|
410
|
|
|
|
|
|
|
unless $code == 200; |
|
411
|
|
|
|
|
|
|
|
|
412
|
0
|
|
|
|
|
|
return $data; |
|
413
|
|
|
|
|
|
|
} |
|
414
|
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
|
|
416
|
0
|
|
|
0
|
1
|
|
sub verify_policy($self, $policyname) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
417
|
0
|
0
|
|
|
|
|
croak "policy name missing" |
|
418
|
|
|
|
|
|
|
unless defined $policyname; |
|
419
|
|
|
|
|
|
|
|
|
420
|
0
|
|
|
|
|
|
my $res = $self->post('/web_api/v' . $self->api_version . |
|
421
|
|
|
|
|
|
|
'/verify-policy', { |
|
422
|
|
|
|
|
|
|
'policy-package' => $policyname, |
|
423
|
|
|
|
|
|
|
}); |
|
424
|
0
|
|
|
|
|
|
my $code = $res->code; |
|
425
|
0
|
|
|
|
|
|
my $data = $res->data; |
|
426
|
0
|
0
|
|
|
|
|
$self->_error_handler($data) |
|
427
|
|
|
|
|
|
|
unless $code == 200; |
|
428
|
|
|
|
|
|
|
|
|
429
|
0
|
|
|
|
|
|
return $data->{'task-id'}; |
|
430
|
|
|
|
|
|
|
} |
|
431
|
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
|
|
433
|
0
|
|
|
0
|
1
|
|
sub install_policy($self, $policyname, $targets, $params={}) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
434
|
0
|
0
|
|
|
|
|
croak "policy name missing" |
|
435
|
|
|
|
|
|
|
unless defined $policyname; |
|
436
|
0
|
0
|
|
|
|
|
croak "target(s) missing" |
|
437
|
|
|
|
|
|
|
unless defined $targets; |
|
438
|
0
|
0
|
0
|
|
|
|
croak "target(s) must be a single name or uid or a list of names or uids" |
|
439
|
|
|
|
|
|
|
unless ref $targets eq '' |
|
440
|
|
|
|
|
|
|
|| ref $targets eq 'ARRAY'; |
|
441
|
0
|
0
|
0
|
|
|
|
croak "parameters needs to be a hashref" |
|
442
|
|
|
|
|
|
|
if defined $params && ref $params ne 'HASH'; |
|
443
|
|
|
|
|
|
|
|
|
444
|
0
|
|
|
|
|
|
my $res = $self->post('/web_api/v' . $self->api_version . |
|
445
|
|
|
|
|
|
|
'/install-policy', { |
|
446
|
|
|
|
|
|
|
$params->%*, |
|
447
|
|
|
|
|
|
|
'policy-package' => $policyname, |
|
448
|
|
|
|
|
|
|
targets => $targets, |
|
449
|
|
|
|
|
|
|
}); |
|
450
|
0
|
|
|
|
|
|
my $code = $res->code; |
|
451
|
0
|
|
|
|
|
|
my $data = $res->data; |
|
452
|
0
|
0
|
|
|
|
|
$self->_error_handler($data) |
|
453
|
|
|
|
|
|
|
unless $code == 200; |
|
454
|
|
|
|
|
|
|
|
|
455
|
0
|
|
|
|
|
|
return $data->{'task-id'}; |
|
456
|
|
|
|
|
|
|
} |
|
457
|
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
|
|
459
|
0
|
|
|
0
|
1
|
|
sub wait_for_task($self, $taskid, $callback) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
460
|
0
|
0
|
|
|
|
|
croak "task-id missing" |
|
461
|
|
|
|
|
|
|
unless defined $taskid; |
|
462
|
0
|
0
|
0
|
|
|
|
croak "callback must be a coderef" |
|
463
|
|
|
|
|
|
|
if defined $callback && ref $callback ne 'CODE'; |
|
464
|
|
|
|
|
|
|
|
|
465
|
0
|
|
|
|
|
|
my $task; |
|
466
|
0
|
|
0
|
|
|
|
while (($task = $self->get_task({'task-id' => $taskid})->{tasks}[0]) |
|
467
|
|
|
|
|
|
|
&& $task->{status} eq 'in progress') { |
|
468
|
0
|
0
|
|
|
|
|
&$callback($task) |
|
469
|
|
|
|
|
|
|
if defined $callback; |
|
470
|
0
|
|
|
|
|
|
sleep 1; |
|
471
|
|
|
|
|
|
|
} |
|
472
|
0
|
|
|
|
|
|
return $task; |
|
473
|
|
|
|
|
|
|
} |
|
474
|
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
|
|
476
|
0
|
|
|
0
|
1
|
|
sub where_used ($self, $object, $query_params = {}) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
477
|
0
|
0
|
|
|
|
|
croak "object must be a hashref" |
|
478
|
|
|
|
|
|
|
unless ref $object eq 'HASH'; |
|
479
|
|
|
|
|
|
|
croak "object needs a name or uid attribute" |
|
480
|
0
|
0
|
0
|
|
|
|
unless exists $object->{name} || exists $object->{uid}; |
|
481
|
|
|
|
|
|
|
|
|
482
|
|
|
|
|
|
|
my $res = $self->post('/web_api/v' . $self->api_version . |
|
483
|
|
|
|
|
|
|
'/where-used', { |
|
484
|
0
|
|
|
0
|
|
|
(map { $_ => $object->{$_} } first { exists $object->{$_} } (qw( uid name ))), |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
485
|
|
|
|
|
|
|
%$query_params, |
|
486
|
|
|
|
|
|
|
}); |
|
487
|
0
|
|
|
|
|
|
my $code = $res->code; |
|
488
|
0
|
|
|
|
|
|
my $data = $res->data; |
|
489
|
0
|
0
|
|
|
|
|
$self->_error_handler($data) |
|
490
|
|
|
|
|
|
|
unless $code == 200; |
|
491
|
|
|
|
|
|
|
|
|
492
|
0
|
|
|
|
|
|
return $data; |
|
493
|
|
|
|
|
|
|
} |
|
494
|
|
|
|
|
|
|
|
|
495
|
|
|
|
|
|
|
1; |
|
496
|
|
|
|
|
|
|
|
|
497
|
|
|
|
|
|
|
__END__ |
|
498
|
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
=pod |
|
500
|
|
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
=encoding UTF-8 |
|
502
|
|
|
|
|
|
|
|
|
503
|
|
|
|
|
|
|
=head1 NAME |
|
504
|
|
|
|
|
|
|
|
|
505
|
|
|
|
|
|
|
Net::Checkpoint::Management::v1 - Checkpoint Management API version 1.x client library |
|
506
|
|
|
|
|
|
|
|
|
507
|
|
|
|
|
|
|
=head1 VERSION |
|
508
|
|
|
|
|
|
|
|
|
509
|
|
|
|
|
|
|
version 0.004002 |
|
510
|
|
|
|
|
|
|
|
|
511
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
512
|
|
|
|
|
|
|
|
|
513
|
|
|
|
|
|
|
use strict; |
|
514
|
|
|
|
|
|
|
use warnings; |
|
515
|
|
|
|
|
|
|
use Net::Checkpoint::Management::v1; |
|
516
|
|
|
|
|
|
|
|
|
517
|
|
|
|
|
|
|
my $cpmgmt = Net::Checkpoint::Management::v1->new( |
|
518
|
|
|
|
|
|
|
server => 'https://cpmgmt.example.com', |
|
519
|
|
|
|
|
|
|
user => 'username', |
|
520
|
|
|
|
|
|
|
passwd => '$password', |
|
521
|
|
|
|
|
|
|
clientattrs => { timeout => 30 }, |
|
522
|
|
|
|
|
|
|
); |
|
523
|
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
$cpmgmt->login; |
|
525
|
|
|
|
|
|
|
|
|
526
|
|
|
|
|
|
|
# OR |
|
527
|
|
|
|
|
|
|
|
|
528
|
|
|
|
|
|
|
$cpmgmt = Net::Checkpoint::Management::v1->new( |
|
529
|
|
|
|
|
|
|
server => 'https://cpmgmt.example.com', |
|
530
|
|
|
|
|
|
|
api_key => '$api-key', |
|
531
|
|
|
|
|
|
|
clientattrs => { timeout => 30 }, |
|
532
|
|
|
|
|
|
|
); |
|
533
|
|
|
|
|
|
|
|
|
534
|
|
|
|
|
|
|
$cpmgmt->login; |
|
535
|
|
|
|
|
|
|
|
|
536
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
537
|
|
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
This module is a client library for the Checkpoint Management API version 1.x. |
|
539
|
|
|
|
|
|
|
Currently it is developed and tested against version R81.20. |
|
540
|
|
|
|
|
|
|
|
|
541
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
542
|
|
|
|
|
|
|
|
|
543
|
|
|
|
|
|
|
This module is using L<Role::REST::Client> under the hood and all its |
|
544
|
|
|
|
|
|
|
L<attributes|Role::REST::Client/ATTRIBUTES> can be set too. |
|
545
|
|
|
|
|
|
|
|
|
546
|
|
|
|
|
|
|
=head2 user |
|
547
|
|
|
|
|
|
|
|
|
548
|
|
|
|
|
|
|
Sets the username used by the L</login> method. |
|
549
|
|
|
|
|
|
|
|
|
550
|
|
|
|
|
|
|
=head2 passwd |
|
551
|
|
|
|
|
|
|
|
|
552
|
|
|
|
|
|
|
Sets the password used by the L</login> method. |
|
553
|
|
|
|
|
|
|
|
|
554
|
|
|
|
|
|
|
=head2 api_key |
|
555
|
|
|
|
|
|
|
|
|
556
|
|
|
|
|
|
|
Sets the API key used by the L</login> method. |
|
557
|
|
|
|
|
|
|
|
|
558
|
|
|
|
|
|
|
=head2 api_versions |
|
559
|
|
|
|
|
|
|
|
|
560
|
|
|
|
|
|
|
Returns a list of all available API versions which gets populated on the first |
|
561
|
|
|
|
|
|
|
call. |
|
562
|
|
|
|
|
|
|
Only works on API version 1.1 and higher. |
|
563
|
|
|
|
|
|
|
|
|
564
|
|
|
|
|
|
|
=head2 api_version |
|
565
|
|
|
|
|
|
|
|
|
566
|
|
|
|
|
|
|
The API version used by all methods. Is automatically set to the highest |
|
567
|
|
|
|
|
|
|
version available by the L</login> method. |
|
568
|
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
=head1 METHODS |
|
570
|
|
|
|
|
|
|
|
|
571
|
|
|
|
|
|
|
=head2 create_package |
|
572
|
|
|
|
|
|
|
|
|
573
|
|
|
|
|
|
|
Creates a package, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
574
|
|
|
|
|
|
|
|
|
575
|
|
|
|
|
|
|
=head2 list_packages |
|
576
|
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
Lists packages, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
578
|
|
|
|
|
|
|
|
|
579
|
|
|
|
|
|
|
=head2 find_package |
|
580
|
|
|
|
|
|
|
|
|
581
|
|
|
|
|
|
|
Finds a package, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
582
|
|
|
|
|
|
|
|
|
583
|
|
|
|
|
|
|
=head2 get_package |
|
584
|
|
|
|
|
|
|
|
|
585
|
|
|
|
|
|
|
Gets a package, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
586
|
|
|
|
|
|
|
|
|
587
|
|
|
|
|
|
|
=head2 update_package |
|
588
|
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
Updates a package, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
590
|
|
|
|
|
|
|
|
|
591
|
|
|
|
|
|
|
=head2 delete_package |
|
592
|
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
Deletes a package, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
594
|
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
=head2 create_accessrule |
|
596
|
|
|
|
|
|
|
|
|
597
|
|
|
|
|
|
|
Creates an accessrule, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
598
|
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
=head2 list_accessrules |
|
600
|
|
|
|
|
|
|
|
|
601
|
|
|
|
|
|
|
Lists accessrules, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
602
|
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
=head2 find_accessrule |
|
604
|
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
Finds an accessrule, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
606
|
|
|
|
|
|
|
|
|
607
|
|
|
|
|
|
|
=head2 get_accessrule |
|
608
|
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
Gets an accessrule, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
610
|
|
|
|
|
|
|
|
|
611
|
|
|
|
|
|
|
=head2 update_accessrule |
|
612
|
|
|
|
|
|
|
|
|
613
|
|
|
|
|
|
|
Updates an accessrule, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
614
|
|
|
|
|
|
|
|
|
615
|
|
|
|
|
|
|
=head2 delete_accessrule |
|
616
|
|
|
|
|
|
|
|
|
617
|
|
|
|
|
|
|
Deletes an accessrule, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
618
|
|
|
|
|
|
|
|
|
619
|
|
|
|
|
|
|
=head2 create_network |
|
620
|
|
|
|
|
|
|
|
|
621
|
|
|
|
|
|
|
Creates a network, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
622
|
|
|
|
|
|
|
|
|
623
|
|
|
|
|
|
|
=head2 list_networks |
|
624
|
|
|
|
|
|
|
|
|
625
|
|
|
|
|
|
|
Lists networks, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
626
|
|
|
|
|
|
|
|
|
627
|
|
|
|
|
|
|
=head2 find_network |
|
628
|
|
|
|
|
|
|
|
|
629
|
|
|
|
|
|
|
Finds a network, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
630
|
|
|
|
|
|
|
|
|
631
|
|
|
|
|
|
|
=head2 get_network |
|
632
|
|
|
|
|
|
|
|
|
633
|
|
|
|
|
|
|
Gets a network, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
634
|
|
|
|
|
|
|
|
|
635
|
|
|
|
|
|
|
=head2 update_network |
|
636
|
|
|
|
|
|
|
|
|
637
|
|
|
|
|
|
|
Updates a network, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
638
|
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
=head2 delete_network |
|
640
|
|
|
|
|
|
|
|
|
641
|
|
|
|
|
|
|
Deletes a network, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
642
|
|
|
|
|
|
|
|
|
643
|
|
|
|
|
|
|
=head2 create_host |
|
644
|
|
|
|
|
|
|
|
|
645
|
|
|
|
|
|
|
Creates a host, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
646
|
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
=head2 list_hosts |
|
648
|
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
Lists hosts, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
650
|
|
|
|
|
|
|
|
|
651
|
|
|
|
|
|
|
=head2 find_host |
|
652
|
|
|
|
|
|
|
|
|
653
|
|
|
|
|
|
|
Finds a host, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
654
|
|
|
|
|
|
|
|
|
655
|
|
|
|
|
|
|
=head2 get_host |
|
656
|
|
|
|
|
|
|
|
|
657
|
|
|
|
|
|
|
Gets a host, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
658
|
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
=head2 update_host |
|
660
|
|
|
|
|
|
|
|
|
661
|
|
|
|
|
|
|
Updates a host, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
662
|
|
|
|
|
|
|
|
|
663
|
|
|
|
|
|
|
=head2 delete_host |
|
664
|
|
|
|
|
|
|
|
|
665
|
|
|
|
|
|
|
Deletes a host, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
666
|
|
|
|
|
|
|
|
|
667
|
|
|
|
|
|
|
=head2 create_address_range |
|
668
|
|
|
|
|
|
|
|
|
669
|
|
|
|
|
|
|
Creates an address_range, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
670
|
|
|
|
|
|
|
|
|
671
|
|
|
|
|
|
|
=head2 list_address_ranges |
|
672
|
|
|
|
|
|
|
|
|
673
|
|
|
|
|
|
|
Lists address_ranges, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
674
|
|
|
|
|
|
|
|
|
675
|
|
|
|
|
|
|
=head2 find_address_range |
|
676
|
|
|
|
|
|
|
|
|
677
|
|
|
|
|
|
|
Finds an address_range, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
678
|
|
|
|
|
|
|
|
|
679
|
|
|
|
|
|
|
=head2 get_address_range |
|
680
|
|
|
|
|
|
|
|
|
681
|
|
|
|
|
|
|
Gets an address_range, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
682
|
|
|
|
|
|
|
|
|
683
|
|
|
|
|
|
|
=head2 update_address_range |
|
684
|
|
|
|
|
|
|
|
|
685
|
|
|
|
|
|
|
Updates an address_range, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
686
|
|
|
|
|
|
|
|
|
687
|
|
|
|
|
|
|
=head2 delete_address_range |
|
688
|
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
Deletes an address_range, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
690
|
|
|
|
|
|
|
|
|
691
|
|
|
|
|
|
|
=head2 create_dns_domain |
|
692
|
|
|
|
|
|
|
|
|
693
|
|
|
|
|
|
|
Creates a dns_domain, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
694
|
|
|
|
|
|
|
|
|
695
|
|
|
|
|
|
|
=head2 list_dns_domains |
|
696
|
|
|
|
|
|
|
|
|
697
|
|
|
|
|
|
|
Lists dns_domains, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
698
|
|
|
|
|
|
|
|
|
699
|
|
|
|
|
|
|
=head2 find_dns_domain |
|
700
|
|
|
|
|
|
|
|
|
701
|
|
|
|
|
|
|
Finds a dns_domain, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
702
|
|
|
|
|
|
|
|
|
703
|
|
|
|
|
|
|
=head2 get_dns_domain |
|
704
|
|
|
|
|
|
|
|
|
705
|
|
|
|
|
|
|
Gets a dns_domain, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
706
|
|
|
|
|
|
|
|
|
707
|
|
|
|
|
|
|
=head2 update_dns_domain |
|
708
|
|
|
|
|
|
|
|
|
709
|
|
|
|
|
|
|
Updates a dns_domain, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
710
|
|
|
|
|
|
|
|
|
711
|
|
|
|
|
|
|
=head2 delete_dns_domain |
|
712
|
|
|
|
|
|
|
|
|
713
|
|
|
|
|
|
|
Deletes a dns_domain, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
714
|
|
|
|
|
|
|
|
|
715
|
|
|
|
|
|
|
=head2 create_group |
|
716
|
|
|
|
|
|
|
|
|
717
|
|
|
|
|
|
|
Creates a group, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
718
|
|
|
|
|
|
|
|
|
719
|
|
|
|
|
|
|
=head2 list_groups |
|
720
|
|
|
|
|
|
|
|
|
721
|
|
|
|
|
|
|
Lists groups, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
722
|
|
|
|
|
|
|
|
|
723
|
|
|
|
|
|
|
=head2 find_group |
|
724
|
|
|
|
|
|
|
|
|
725
|
|
|
|
|
|
|
Finds a group, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
726
|
|
|
|
|
|
|
|
|
727
|
|
|
|
|
|
|
=head2 get_group |
|
728
|
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
Gets a group, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
730
|
|
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
=head2 update_group |
|
732
|
|
|
|
|
|
|
|
|
733
|
|
|
|
|
|
|
Updates a group, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
734
|
|
|
|
|
|
|
|
|
735
|
|
|
|
|
|
|
=head2 delete_group |
|
736
|
|
|
|
|
|
|
|
|
737
|
|
|
|
|
|
|
Deletes a group, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
738
|
|
|
|
|
|
|
|
|
739
|
|
|
|
|
|
|
=head2 create_access_role |
|
740
|
|
|
|
|
|
|
|
|
741
|
|
|
|
|
|
|
Creates an access_role, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
742
|
|
|
|
|
|
|
|
|
743
|
|
|
|
|
|
|
=head2 list_access_roles |
|
744
|
|
|
|
|
|
|
|
|
745
|
|
|
|
|
|
|
Lists access_roles, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
746
|
|
|
|
|
|
|
|
|
747
|
|
|
|
|
|
|
=head2 find_access_role |
|
748
|
|
|
|
|
|
|
|
|
749
|
|
|
|
|
|
|
Finds an access_role, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
750
|
|
|
|
|
|
|
|
|
751
|
|
|
|
|
|
|
=head2 get_access_role |
|
752
|
|
|
|
|
|
|
|
|
753
|
|
|
|
|
|
|
Gets an access_role, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
754
|
|
|
|
|
|
|
|
|
755
|
|
|
|
|
|
|
=head2 update_access_role |
|
756
|
|
|
|
|
|
|
|
|
757
|
|
|
|
|
|
|
Updates an access_role, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
758
|
|
|
|
|
|
|
|
|
759
|
|
|
|
|
|
|
=head2 delete_access_role |
|
760
|
|
|
|
|
|
|
|
|
761
|
|
|
|
|
|
|
Deletes an access_role, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
762
|
|
|
|
|
|
|
|
|
763
|
|
|
|
|
|
|
=head2 create_service_tcp |
|
764
|
|
|
|
|
|
|
|
|
765
|
|
|
|
|
|
|
Creates a service_tcp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
766
|
|
|
|
|
|
|
|
|
767
|
|
|
|
|
|
|
=head2 list_services_tcp |
|
768
|
|
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
Lists services_tcp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
770
|
|
|
|
|
|
|
|
|
771
|
|
|
|
|
|
|
=head2 find_service_tcp |
|
772
|
|
|
|
|
|
|
|
|
773
|
|
|
|
|
|
|
Finds a service_tcp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
774
|
|
|
|
|
|
|
|
|
775
|
|
|
|
|
|
|
=head2 get_service_tcp |
|
776
|
|
|
|
|
|
|
|
|
777
|
|
|
|
|
|
|
Gets a service_tcp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
778
|
|
|
|
|
|
|
|
|
779
|
|
|
|
|
|
|
=head2 update_service_tcp |
|
780
|
|
|
|
|
|
|
|
|
781
|
|
|
|
|
|
|
Updates a service_tcp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
782
|
|
|
|
|
|
|
|
|
783
|
|
|
|
|
|
|
=head2 delete_service_tcp |
|
784
|
|
|
|
|
|
|
|
|
785
|
|
|
|
|
|
|
Deletes a service_tcp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
786
|
|
|
|
|
|
|
|
|
787
|
|
|
|
|
|
|
=head2 create_service_udp |
|
788
|
|
|
|
|
|
|
|
|
789
|
|
|
|
|
|
|
Creates a service_udp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
790
|
|
|
|
|
|
|
|
|
791
|
|
|
|
|
|
|
=head2 list_services_udp |
|
792
|
|
|
|
|
|
|
|
|
793
|
|
|
|
|
|
|
Lists services_udp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
794
|
|
|
|
|
|
|
|
|
795
|
|
|
|
|
|
|
=head2 find_service_udp |
|
796
|
|
|
|
|
|
|
|
|
797
|
|
|
|
|
|
|
Finds a service_udp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
798
|
|
|
|
|
|
|
|
|
799
|
|
|
|
|
|
|
=head2 get_service_udp |
|
800
|
|
|
|
|
|
|
|
|
801
|
|
|
|
|
|
|
Gets a service_udp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
802
|
|
|
|
|
|
|
|
|
803
|
|
|
|
|
|
|
=head2 update_service_udp |
|
804
|
|
|
|
|
|
|
|
|
805
|
|
|
|
|
|
|
Updates a service_udp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
806
|
|
|
|
|
|
|
|
|
807
|
|
|
|
|
|
|
=head2 delete_service_udp |
|
808
|
|
|
|
|
|
|
|
|
809
|
|
|
|
|
|
|
Deletes a service_udp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
810
|
|
|
|
|
|
|
|
|
811
|
|
|
|
|
|
|
=head2 create_service_icmp |
|
812
|
|
|
|
|
|
|
|
|
813
|
|
|
|
|
|
|
Creates a service_icmp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
814
|
|
|
|
|
|
|
|
|
815
|
|
|
|
|
|
|
=head2 list_services_icmp |
|
816
|
|
|
|
|
|
|
|
|
817
|
|
|
|
|
|
|
Lists services_icmp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
818
|
|
|
|
|
|
|
|
|
819
|
|
|
|
|
|
|
=head2 find_service_icmp |
|
820
|
|
|
|
|
|
|
|
|
821
|
|
|
|
|
|
|
Finds a service_icmp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
822
|
|
|
|
|
|
|
|
|
823
|
|
|
|
|
|
|
=head2 get_service_icmp |
|
824
|
|
|
|
|
|
|
|
|
825
|
|
|
|
|
|
|
Gets a service_icmp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
826
|
|
|
|
|
|
|
|
|
827
|
|
|
|
|
|
|
=head2 update_service_icmp |
|
828
|
|
|
|
|
|
|
|
|
829
|
|
|
|
|
|
|
Updates a service_icmp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
830
|
|
|
|
|
|
|
|
|
831
|
|
|
|
|
|
|
=head2 delete_service_icmp |
|
832
|
|
|
|
|
|
|
|
|
833
|
|
|
|
|
|
|
Deletes a service_icmp, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
834
|
|
|
|
|
|
|
|
|
835
|
|
|
|
|
|
|
=head2 create_service_icmpv6 |
|
836
|
|
|
|
|
|
|
|
|
837
|
|
|
|
|
|
|
Creates a service_icmpv6, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
838
|
|
|
|
|
|
|
|
|
839
|
|
|
|
|
|
|
=head2 list_services_icmpv6 |
|
840
|
|
|
|
|
|
|
|
|
841
|
|
|
|
|
|
|
Lists services_icmpv6, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
842
|
|
|
|
|
|
|
|
|
843
|
|
|
|
|
|
|
=head2 find_service_icmpv6 |
|
844
|
|
|
|
|
|
|
|
|
845
|
|
|
|
|
|
|
Finds a service_icmpv6, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
846
|
|
|
|
|
|
|
|
|
847
|
|
|
|
|
|
|
=head2 get_service_icmpv6 |
|
848
|
|
|
|
|
|
|
|
|
849
|
|
|
|
|
|
|
Gets a service_icmpv6, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
850
|
|
|
|
|
|
|
|
|
851
|
|
|
|
|
|
|
=head2 update_service_icmpv6 |
|
852
|
|
|
|
|
|
|
|
|
853
|
|
|
|
|
|
|
Updates a service_icmpv6, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
854
|
|
|
|
|
|
|
|
|
855
|
|
|
|
|
|
|
=head2 delete_service_icmpv6 |
|
856
|
|
|
|
|
|
|
|
|
857
|
|
|
|
|
|
|
Deletes a service_icmpv6, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
858
|
|
|
|
|
|
|
|
|
859
|
|
|
|
|
|
|
=head2 create_service_other |
|
860
|
|
|
|
|
|
|
|
|
861
|
|
|
|
|
|
|
Creates a service_other, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
862
|
|
|
|
|
|
|
|
|
863
|
|
|
|
|
|
|
=head2 list_services_other |
|
864
|
|
|
|
|
|
|
|
|
865
|
|
|
|
|
|
|
Lists services_other, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
866
|
|
|
|
|
|
|
|
|
867
|
|
|
|
|
|
|
=head2 find_service_other |
|
868
|
|
|
|
|
|
|
|
|
869
|
|
|
|
|
|
|
Finds a service_other, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
870
|
|
|
|
|
|
|
|
|
871
|
|
|
|
|
|
|
=head2 get_service_other |
|
872
|
|
|
|
|
|
|
|
|
873
|
|
|
|
|
|
|
Gets a service_other, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
874
|
|
|
|
|
|
|
|
|
875
|
|
|
|
|
|
|
=head2 update_service_other |
|
876
|
|
|
|
|
|
|
|
|
877
|
|
|
|
|
|
|
Updates a service_other, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
878
|
|
|
|
|
|
|
|
|
879
|
|
|
|
|
|
|
=head2 delete_service_other |
|
880
|
|
|
|
|
|
|
|
|
881
|
|
|
|
|
|
|
Deletes a service_other, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
882
|
|
|
|
|
|
|
|
|
883
|
|
|
|
|
|
|
=head2 create_service_group |
|
884
|
|
|
|
|
|
|
|
|
885
|
|
|
|
|
|
|
Creates a service_group, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"create_$singular"> |
|
886
|
|
|
|
|
|
|
|
|
887
|
|
|
|
|
|
|
=head2 list_service_groups |
|
888
|
|
|
|
|
|
|
|
|
889
|
|
|
|
|
|
|
Lists service_groups, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
890
|
|
|
|
|
|
|
|
|
891
|
|
|
|
|
|
|
=head2 find_service_group |
|
892
|
|
|
|
|
|
|
|
|
893
|
|
|
|
|
|
|
Finds a service_group, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
894
|
|
|
|
|
|
|
|
|
895
|
|
|
|
|
|
|
=head2 get_service_group |
|
896
|
|
|
|
|
|
|
|
|
897
|
|
|
|
|
|
|
Gets a service_group, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
898
|
|
|
|
|
|
|
|
|
899
|
|
|
|
|
|
|
=head2 update_service_group |
|
900
|
|
|
|
|
|
|
|
|
901
|
|
|
|
|
|
|
Updates a service_group, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
902
|
|
|
|
|
|
|
|
|
903
|
|
|
|
|
|
|
=head2 delete_service_group |
|
904
|
|
|
|
|
|
|
|
|
905
|
|
|
|
|
|
|
Deletes a service_group, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"delete_$singular"> |
|
906
|
|
|
|
|
|
|
|
|
907
|
|
|
|
|
|
|
=head2 list_sessions |
|
908
|
|
|
|
|
|
|
|
|
909
|
|
|
|
|
|
|
Lists sessions, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
910
|
|
|
|
|
|
|
|
|
911
|
|
|
|
|
|
|
=head2 find_session |
|
912
|
|
|
|
|
|
|
|
|
913
|
|
|
|
|
|
|
Finds a session, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
914
|
|
|
|
|
|
|
|
|
915
|
|
|
|
|
|
|
=head2 get_session |
|
916
|
|
|
|
|
|
|
|
|
917
|
|
|
|
|
|
|
Gets a session, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
918
|
|
|
|
|
|
|
|
|
919
|
|
|
|
|
|
|
=head2 update_session |
|
920
|
|
|
|
|
|
|
|
|
921
|
|
|
|
|
|
|
Updates a session, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"update_$singular"> |
|
922
|
|
|
|
|
|
|
|
|
923
|
|
|
|
|
|
|
=head2 list_tasks |
|
924
|
|
|
|
|
|
|
|
|
925
|
|
|
|
|
|
|
Lists tasks, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"list_$object"> |
|
926
|
|
|
|
|
|
|
|
|
927
|
|
|
|
|
|
|
=head2 find_task |
|
928
|
|
|
|
|
|
|
|
|
929
|
|
|
|
|
|
|
Finds a task, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"find_$singular"> |
|
930
|
|
|
|
|
|
|
|
|
931
|
|
|
|
|
|
|
=head2 get_task |
|
932
|
|
|
|
|
|
|
|
|
933
|
|
|
|
|
|
|
Gets a task, see L<Net::Checkpoint::Management::v1::Role::ObjectMethods/"get_$singular"> |
|
934
|
|
|
|
|
|
|
|
|
935
|
|
|
|
|
|
|
=head2 login |
|
936
|
|
|
|
|
|
|
|
|
937
|
|
|
|
|
|
|
Logs into the Checkpoint Manager API using version 1. |
|
938
|
|
|
|
|
|
|
|
|
939
|
|
|
|
|
|
|
If both the L</api_key>, L</user> and L</passwd> are set, the L</api_key> is used. |
|
940
|
|
|
|
|
|
|
|
|
941
|
|
|
|
|
|
|
Takes an optional hashref of login parameters like read-only or domain. |
|
942
|
|
|
|
|
|
|
|
|
943
|
|
|
|
|
|
|
=head2 logout |
|
944
|
|
|
|
|
|
|
|
|
945
|
|
|
|
|
|
|
Logs out of the Checkpoint Manager API using version 1. |
|
946
|
|
|
|
|
|
|
|
|
947
|
|
|
|
|
|
|
=head2 publish |
|
948
|
|
|
|
|
|
|
|
|
949
|
|
|
|
|
|
|
Publishes all previously submitted changes. |
|
950
|
|
|
|
|
|
|
Returns the task id on success. |
|
951
|
|
|
|
|
|
|
|
|
952
|
|
|
|
|
|
|
=head2 discard |
|
953
|
|
|
|
|
|
|
|
|
954
|
|
|
|
|
|
|
Discards all previously submitted changes. |
|
955
|
|
|
|
|
|
|
Returns a hashref containing the operation status message and the number of |
|
956
|
|
|
|
|
|
|
discarded changes. |
|
957
|
|
|
|
|
|
|
|
|
958
|
|
|
|
|
|
|
=head2 verify_policy |
|
959
|
|
|
|
|
|
|
|
|
960
|
|
|
|
|
|
|
Verifies the policy of the given package. |
|
961
|
|
|
|
|
|
|
|
|
962
|
|
|
|
|
|
|
Takes a policy name. |
|
963
|
|
|
|
|
|
|
|
|
964
|
|
|
|
|
|
|
Returns the task id on success. |
|
965
|
|
|
|
|
|
|
|
|
966
|
|
|
|
|
|
|
=head2 install_policy |
|
967
|
|
|
|
|
|
|
|
|
968
|
|
|
|
|
|
|
Installs the policy of the given package onto the given target(s). |
|
969
|
|
|
|
|
|
|
|
|
970
|
|
|
|
|
|
|
Takes a policy name, target(s) and an optional hashref of additional |
|
971
|
|
|
|
|
|
|
parameters. |
|
972
|
|
|
|
|
|
|
The target(s) can be a single name or uid or a list of names or uids. |
|
973
|
|
|
|
|
|
|
|
|
974
|
|
|
|
|
|
|
Returns the task id on success. |
|
975
|
|
|
|
|
|
|
|
|
976
|
|
|
|
|
|
|
=head2 wait_for_task |
|
977
|
|
|
|
|
|
|
|
|
978
|
|
|
|
|
|
|
Takes a task id and checks its status every second until it isn't |
|
979
|
|
|
|
|
|
|
'in progress' any more and return the status. |
|
980
|
|
|
|
|
|
|
Takes an optional callback coderef which is called for every check with the |
|
981
|
|
|
|
|
|
|
task as argument. |
|
982
|
|
|
|
|
|
|
|
|
983
|
|
|
|
|
|
|
=head2 where_used |
|
984
|
|
|
|
|
|
|
|
|
985
|
|
|
|
|
|
|
Takes a Checkpoint object in form of a hashref as returned by the various APIs |
|
986
|
|
|
|
|
|
|
and optional query parameters. |
|
987
|
|
|
|
|
|
|
|
|
988
|
|
|
|
|
|
|
Prefers the object uid over its name for the query. |
|
989
|
|
|
|
|
|
|
|
|
990
|
|
|
|
|
|
|
Returns the unmodified response on success. |
|
991
|
|
|
|
|
|
|
|
|
992
|
|
|
|
|
|
|
=head1 AUTHOR |
|
993
|
|
|
|
|
|
|
|
|
994
|
|
|
|
|
|
|
Alexander Hartmaier <abraxxa@cpan.org> |
|
995
|
|
|
|
|
|
|
|
|
996
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
997
|
|
|
|
|
|
|
|
|
998
|
|
|
|
|
|
|
This software is copyright (c) 2019 by Alexander Hartmaier. |
|
999
|
|
|
|
|
|
|
|
|
1000
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
|
1001
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
|
1002
|
|
|
|
|
|
|
|
|
1003
|
|
|
|
|
|
|
=cut |