]>
Commit | Line | Data |
---|---|---|
565bbc73 DM |
1 | package PVE::APIClient::Commands::remote; |
2 | ||
3 | use strict; | |
4 | use warnings; | |
5 | ||
6 | use PVE::CLIHandler; | |
7 | ||
8 | use base qw(PVE::CLIHandler); | |
9 | ||
10 | __PACKAGE__->register_method ({ | |
11 | name => 'add', | |
12 | path => 'add', | |
13 | method => 'POST', | |
14 | description => "Add a remote to your config file.", | |
15 | parameters => { | |
16 | additionalProperties => 0, | |
17 | properties => { | |
18 | name => { | |
19 | description => "The name of the remote.", | |
20 | type => 'string', | |
21 | }, | |
22 | host => { | |
23 | description => "The host, either host, host:port or https://host:port", | |
24 | type => 'string', | |
25 | }, | |
26 | username => { | |
27 | description => "The username.", | |
28 | type => 'string', | |
29 | optional => 1, | |
30 | }, | |
31 | }, | |
32 | }, | |
33 | returns => { type => 'null'}, | |
34 | code => sub { | |
35 | my ($param) = @_; | |
36 | ||
37 | die "implement me"; | |
38 | ||
39 | }}); | |
40 | ||
41 | __PACKAGE__->register_method ({ | |
42 | name => 'remove', | |
43 | path => 'remove', | |
44 | method => 'DELETE', | |
45 | description => "Removes a remote from your config file.", | |
46 | parameters => { | |
47 | additionalProperties => 0, | |
48 | properties => { | |
49 | name => { | |
50 | description => "The name of the remote.", | |
51 | type => 'string', | |
52 | }, | |
53 | }, | |
54 | }, | |
55 | returns => { type => 'null'}, | |
56 | code => sub { | |
57 | my ($param) = @_; | |
58 | ||
59 | die "implement me"; | |
60 | ||
61 | }}); | |
62 | ||
63 | our $cmddef = { | |
64 | add => [ __PACKAGE__, 'add', ['name', 'host']], | |
65 | remove => [ __PACKAGE__, 'remove', ['name']], | |
66 | }; | |
67 | ||
68 | 1; |