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