Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CentralNic
pepper
Commits
718b5b26
Unverified
Commit
718b5b26
authored
Jan 24, 2017
by
Gavin Brown
Browse files
support RGP restore using `restore DOMAIN`
parent
f8a84bea
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
718b5b26
...
...
@@ -134,6 +134,10 @@ Once running, Pepper provides a simple command line interface. The available com
renew a domain (1 year by default)
-
`restore DOMAIN`
submit an RGP restore request for a domain
-
`create host PARAMS`
create a host object. See ["CREATING HOST OBJECTS"](#creating-host-objects) for more information.
...
...
pepper
View file @
718b5b26
...
...
@@ -51,6 +51,7 @@ my $handlers = {
'
edit
'
=>
\
&handle_edit
,
'
cert
'
=>
\
&handle_cert
,
'
key
'
=>
\
&handle_key
,
'
restore
'
=>
\
&handle_restore
,
};
if
(
$opt
->
{'
help
'})
{
...
...
@@ -574,6 +575,27 @@ sub handle_cert {
note
("
Using '
$cert
' as certificate
");
}
sub
handle_restore
{
my
$domain
=
shift
;
my
$frame
=
Net::EPP::Frame::Command::Update::
Domain
->
new
;
$frame
->
setDomain
(
$domain
);
my
$ext
=
$frame
->
getNode
('
extension
');
if
(
!
defined
(
$ext
))
{
$ext
=
$frame
->
createElementNS
(
undef
,
'
extension
');
$frame
->
getNode
('
command
')
->
insertBefore
(
$ext
,
$frame
->
clTRID
);
}
my
$RGP_URN
=
'
urn:ietf:params:xml:ns:rgp-1.0
';
my
$upd
=
$ext
->
addNewChild
(
$RGP_URN
,
'
rgp:update
');
my
$restore
=
$upd
->
addNewChild
(
$RGP_URN
,
'
rgp:restore
');
$restore
->
setAttribute
('
op
',
'
request
');
return
$epp
->
request
(
$frame
);
}
sub
note
{
my
(
$fmt
,
@args
)
=
@_
;
my
$msg
=
sprintf
(
$fmt
,
@args
);
...
...
@@ -735,6 +757,10 @@ delete an object (C<TYPE> is one of C<domain>, C<host>, C<contact>)
renew a domain (1 year by default)
=item C<restore DOMAIN>
submit an RGP restore request for a domain
=item C<create host PARAMS>
create a host object. See L<CREATING HOST OBJECTS> for more information.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment