1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | var g = require('strong-globalize')();
|
16 |
|
17 | module.exports = {
|
18 | name: 'catalogs',
|
19 | version: require('../package.json').version,
|
20 | path: __filename,
|
21 | isBuiltin: true,
|
22 | topics: getTopics,
|
23 | };
|
24 |
|
25 | function getTopics() {
|
26 | return [ {
|
27 | name: 'catalogs',
|
28 | commands: [
|
29 | {
|
30 | command: 'list',
|
31 | loginRequired: 'org',
|
32 | aliases: [ 'catalogs' ],
|
33 | helpInfo: function() {
|
34 | return g.f('apic_catalogs_list_help.txt');
|
35 | },
|
36 | action: function(opts) {
|
37 | return require('./plugin-impl').catalogsList(opts);
|
38 | },
|
39 | options: [
|
40 | { name: 'all-organizations', rune: 'O', type: 'boolean' },
|
41 | { name: 'organization', rune: 'o', type: 'name', default: '$APIC_CONFIG$.org.data.orgs' },
|
42 | { name: 'server', rune: 's', type: 'host', default: '$APIC_CONFIG$.org.host', required: true },
|
43 | ],
|
44 | },
|
45 | {
|
46 | command: 'create <displayName>',
|
47 | loginRequired: 'org',
|
48 | helpInfo: function() {
|
49 | return g.f('apic_catalogs_create_help.txt');
|
50 | },
|
51 | action: function(displayName, opts) {
|
52 | return require('./plugin-impl').catalogsCreate(displayName, opts);
|
53 | },
|
54 | options: [
|
55 | { name: 'name' },
|
56 | { name: 'organization', rune: 'o', type: 'name', default: '$APIC_CONFIG$.org.data.orgs', required: true },
|
57 | { name: 'server', rune: 's', type: 'host', default: '$APIC_CONFIG$.org.host', required: true },
|
58 | ],
|
59 | },
|
60 | {
|
61 | command: 'get <name>',
|
62 | loginRequired: 'org',
|
63 | helpInfo: function() {
|
64 | return g.f('apic_catalogs_get_help.txt');
|
65 | },
|
66 | action: function(name, opts) {
|
67 | return require('./plugin-impl').catalogsGet(name, opts);
|
68 | },
|
69 | options: [
|
70 | { name: 'organization', rune: 'o', type: 'name', default: '$APIC_CONFIG$.org.data.orgs', required: true },
|
71 | { name: 'server', rune: 's', type: 'host', default: '$APIC_CONFIG$.org.host', required: true },
|
72 | ],
|
73 | },
|
74 | {
|
75 | command: 'delete <name>',
|
76 | loginRequired: 'org',
|
77 | helpInfo: function() {
|
78 | return g.f('apic_catalogs_delete_help.txt');
|
79 | },
|
80 | action: function(name, opts) {
|
81 | return require('./plugin-impl').catalogsDelete(name, opts);
|
82 | },
|
83 | options: [
|
84 | { name: 'organization', rune: 'o', type: 'name', default: '$APIC_CONFIG$.org.data.orgs', required: true },
|
85 | { name: 'server', rune: 's', type: 'host', default: '$APIC_CONFIG$.org.host', required: true },
|
86 | ],
|
87 | },
|
88 | {
|
89 | command: 'set <name>',
|
90 | loginRequired: 'org',
|
91 | helpInfo: function() {
|
92 | return g.f('apic_catalogs_set_help.txt');
|
93 | },
|
94 | action: function(name, opts) {
|
95 | return require('./plugin-impl').catalogsSet(name, opts);
|
96 | },
|
97 | options: [
|
98 | { name: 'name' },
|
99 | { name: 'display-name' },
|
100 | { name: 'organization', rune: 'o', type: 'name', default: '$APIC_CONFIG$.org.data.orgs', required: true },
|
101 | { name: 'server', rune: 's', type: 'host', default: '$APIC_CONFIG$.org.host', required: true },
|
102 | { name: 'spaces', type: 'enum', values: [ 'enabled', 'disabled' ] },
|
103 | ],
|
104 | },
|
105 | {
|
106 | command: 'transfer <name> <userId>',
|
107 | loginRequired: 'org',
|
108 | helpInfo: function() {
|
109 | return g.f('apic_catalogs_transfer_help.txt');
|
110 | },
|
111 | action: function(name, userId, opts) {
|
112 | return require('./plugin-impl').catalogsTransfer(name, userId, opts);
|
113 | },
|
114 | options: [
|
115 | { name: 'name' },
|
116 | { name: 'organization', rune: 'o', type: 'name', default: '$APIC_CONFIG$.org.data.orgs', required: true },
|
117 | { name: 'server', rune: 's', type: 'host', default: '$APIC_CONFIG$.org.host', required: true },
|
118 | ],
|
119 | },
|
120 | ],
|
121 | } ];
|
122 | }
|
123 |
|