libepp_nicbr
AsnFunctions.H
Go to the documentation of this file.
1 /* ${copyright}$ */
2 /* $Id: AsnFunctions.H 1245 2014-11-17 16:50:01Z rafael $ */
6 #ifndef __ASN_FUNCTIONS_H__
7 #define __ASN_FUNCTIONS_H__
9 
10 #include "AsnCheck.H"
11 #include "AsnCreate.H"
12 #include "AsnDelete.H"
13 #include "AsnInfo.H"
14 #include "AsnRenew.H"
15 #include "AsnTransfer.H"
16 #include "AsnUpdate.H"
17 
19 
24 int cmd_asn_help(string error_msg, string specific = "")
25 {
26  if (error_msg != "") {
27  printf("error: %s\n", error_msg.c_str());
28  }
29 
30  printf("asn command syntax help:\n");
31  printf("\n");
32 
33  if (specific == "" || specific == "check") {
34  printf(" check <asn> [asn ...]\n");
35  printf("\n");
36  }
37  if (specific == "" || specific == "create") {
38  printf(" create <asn> <-o organization> <-contact type=value> "
39  "[-contact type=value ...]\n"
40  " [-as-in \"value\" ...] [-as-out \"value\" ...]\n");
41  printf("\n");
42  }
43  if (specific == "" || specific == "delete") {
44  printf(" delete <asn>\n");
45  printf("\n");
46  }
47  if (specific == "" || specific == "info") {
48  printf(" info <asn>\n");
49  printf("\n");
50  }
51  if (specific == "" || specific == "renew") {
52  printf(" renew <asn> <-expdate expDate> [-period time:unit]\n");
53  printf("\n");
54  }
55  if (specific == "" || specific == "transfer") {
56  printf(" transfer <asn> <-op [query|request]>\n");
57  printf("\n");
58  }
59  if (specific == "" || specific == "update") {
60  printf(" update <asn> [-add-contact type=value ...]\n"
61  " [-rem-contact type=value ...] [-o organization]"
62  " [-creation-date yyyy-mm-ddThh:mm:ss.0Z]\n"
63  " [-as-in-add \"value\" ...] [-as-in-rem \"value\" ...]\n"
64  " [-as-out-add \"value\" ...] [-as-out-rem \"value\" ...]\n");
65  printf("\n");
66  }
67 
68  if (error_msg != "") {
69  return -1;
70  }
71 
72  return 0;
73 }
74 
76 
80 int cmd_asn_check(vector<string> &args)
81 {
82  string cmd_name = "check";
83 
84  AsnCheck act;
85  AsnCheckCmd *cmd = act.get_command();
86 
87  if (args.empty()) {
88  return cmd_asn_help("no ASNs specified", cmd_name);
89  }
90 
91  while (!args.empty()) {
92  int asn = atoi(args[0].c_str());
93  if (asn > 0) {
94  cmd->add_asn(asn);
95  args.erase(args.begin());
96  } else {
97  return cmd_asn_help("invalid ASN: '" + args[0] + "'", cmd_name);
98  }
99  }
100 
101  if (_debug) {
102  list<int> asns = cmd->get_asn_list();
103  printf("ASNs to be checked:\n");
104  list<int>::const_iterator asn;
105  for (asn = asns.begin(); asn != asns.end(); asn++) {
106  printf(" [%d]\n", (*asn));
107  }
108  } // _debug
109 
110  if (process_action(act) != 0) {
111  return -1;
112  }
113 
114  return 0;
115 }
116 
118 
122 int cmd_asn_create(vector<string> &args)
123 {
124  string cmd_name = "create";
125 
126  AsnCreate act;
127  AsnCreateCmd *cmd = act.get_command();
128 
129  if (args.empty()) {
130  return cmd_asn_help("no ASN specified", cmd_name);
131  }
132 
133  int asn = atoi(args[0].c_str());
134  if (asn <= 0) {
135  return cmd_asn_help("invalid ASN: '" + args[0] + "'", cmd_name);
136  }
137  cmd->set_asn(asn);
138  args.erase(args.begin());
139 
140  bool hasOrganization = false;
141  bool hasContacts = false;
142 
143  while (!args.empty()) {
144  if (args[0] == "-contact") {
145  //contact
146  hasContacts = true;
147  args.erase(args.begin());
148  if (args.empty()) {
149  return cmd_asn_help("contact parameter missing", cmd_name);
150  }
151 
152  string type;
153  string value;
154  if (SheppStrUtil::split(args[0], type, value, "=", false) != 0) {
155  return cmd_asn_help("invalid contact", cmd_name);
156  }
157 
158  cmd->insert_contact(type, value);
159  args.erase(args.begin());
160  } else if (args[0] == "-o") {
161  //set organization
162  if (hasOrganization) {
163  return cmd_asn_help("only one organization allowed per command",
164  cmd_name);
165  } else {
166  hasOrganization = true;
167  }
168  args.erase(args.begin());
169  if (args.empty()) {
170  return cmd_asn_help("organization parameter missing", cmd_name);
171  }
172  cmd->set_organization(args[0]);
173  args.erase(args.begin());
174  } else if (args[0] == "-as-in") {
175  args.erase(args.begin());
176  if (args.empty()) {
177  return cmd_asn_help("as-in parameter missing", cmd_name);
178  }
179 
180  string asIn = args[0];
181  args.erase(args.begin());
182 
183  if (SheppStrUtil::quote_gathering(args, asIn) != 0) {
184  return cmd_asn_help("error setting as-in", cmd_name);
185  }
186 
187  cmd->insert_as_in(asIn);
188 
189  } else if (args[0] == "-as-out") {
190  args.erase(args.begin());
191  if (args.empty()) {
192  return cmd_asn_help("as-out parameter missing", cmd_name);
193  }
194 
195  string asOut = args[0];
196  args.erase(args.begin());
197 
198  if (SheppStrUtil::quote_gathering(args, asOut) != 0) {
199  return cmd_asn_help("error setting as-out", cmd_name);
200  }
201 
202  cmd->insert_as_out(asOut);
203 
204  } else {
205  return cmd_asn_help("invalid syntax near \"" + args[0] + "\"",
206  cmd_name);
207  }
208  }
209 
210  if (!hasOrganization) {
211  return cmd_asn_help("no organization specified", cmd_name);
212  }
213 
214  if (!hasContacts) {
215  return cmd_asn_help("no contact specified", cmd_name);
216  }
217 
218  if (_debug) {
219  printf("ASN to be created: [%d]\n", cmd->get_asn());
220  printf("organization: [%s]\n", cmd->get_organization().c_str());
221 
222  map< string, string, less<string> > contacts = cmd->get_contacts();
223  map< string, string, less<string> >::const_iterator cit;
224  for (cit = contacts.begin(); cit != contacts.end(); cit++) {
225  printf("contact %s: %s\n", (*cit).first.c_str(), (*cit).second.c_str());
226  }
227  } // _debug
228 
229  if (process_action(act) != 0) {
230  return -1;
231  }
232 
233  return 0;
234 }
235 
237 
241 int cmd_asn_delete(vector<string> &args)
242 {
243  string cmd_name = "delete";
244 
245  AsnDelete act;
246  AsnDeleteCmd *cmd = act.get_command();
247 
248  if (args.size() != 1) {
249  return cmd_asn_help("exactly one ASN must be specified", cmd_name);
250  }
251 
252  int asn = atoi(args[0].c_str());
253  if (asn <= 0) {
254  return cmd_asn_help("invalid ASN: '" + args[0] + "'", cmd_name);
255  }
256 
257  cmd->set_asn(asn);
258 
259  if (_debug) {
260  printf("ASN to be deleted: [%d]\n", cmd->get_asn());
261  } // _debug
262 
263  if (process_action(act) != 0) {
264  return -1;
265  }
266 
267  return 0;
268 }
269 
271 
275 int cmd_asn_info(vector<string> &args)
276 {
277  string cmd_name = "info";
278 
279  AsnInfo act;
280  AsnInfoCmd *cmd = act.get_command();
281 
282  if (args.size() != 1) {
283  return cmd_asn_help("exactly one ASN must be specified", cmd_name);
284  }
285 
286  int asn = atoi(args[0].c_str());
287  if (asn <= 0) {
288  return cmd_asn_help("invalid ASN: '" + args[0] + "'", cmd_name);
289  }
290 
291  cmd->set_asn(asn);
292 
293  if (_debug) {
294  printf("ASN to get info: [%d]\n", cmd->get_asn());
295  } // _debug
296 
297  if (process_action(act) != 0) {
298  return -1;
299  }
300 
301  return 0;
302 }
303 
305 
309 int cmd_asn_renew(vector<string> &args)
310 {
311  string cmd_name = "renew";
312 
313  AsnRenew act;
314  AsnRenewCmd *cmd = act.get_command();
315 
316  if (args.empty()) {
317  return cmd_asn_help("no ASN specified", cmd_name);
318  }
319 
320  int asn = atoi(args[0].c_str());
321  if (asn <= 0) {
322  return cmd_asn_help("invalid ASN: '" + args[0] + "'", cmd_name);
323  }
324  cmd->set_asn(asn);
325  args.erase(args.begin());
326 
327  // mandatory field
328  bool hasExpDate = false;
329 
330  while (!args.empty()) {
331  if (args[0] == "-expdate") {
332  //expdate
333  if (hasExpDate) {
334  return cmd_asn_help("only one expDate allowed per command",
335  cmd_name);
336  } else {
337  hasExpDate = true;
338  }
339  args.erase(args.begin());
340  if (args.empty()) {
341  return cmd_asn_help("expDate missing", cmd_name);
342  }
343  cmd->set_expDate(args[0]);
344  args.erase(args.begin());
345  } else if (args[0] == "-period") {
346  //period
347  args.erase(args.begin());
348  if (args.empty()) {
349  return cmd_asn_help("period parameter missing", cmd_name);
350  }
351 
352  string time;
353  string unit;
354  if (SheppStrUtil::split(args[0], time, unit, ":", false) != 0) {
355  return cmd_asn_help("invalid period", cmd_name);
356  }
357 
358  cmd->set_period(atoi(time.c_str()), unit);
359  args.erase(args.begin());
360  } else {
361  return cmd_asn_help("invalid syntax near \"" + args[0] + "\"",
362  cmd_name);
363  }
364  }
365 
366  // check mandatory fields
367  if (!hasExpDate) {
368  return cmd_asn_help("no expDate specified", cmd_name);
369  }
370 
371  if (_debug) {
372  printf("asn : [%d]\n", cmd->get_asn());
373  printf("expDate: [%s]\n", cmd->get_expDate().c_str());
374  if (cmd->get_period().time != 0 || cmd->get_period().unit != "") {
375  printf("period : [%d %s]\n", cmd->get_period().time,
376  cmd->get_period().unit.c_str());
377  }
378  } // _debug
379 
380  if (process_action(act) != 0) {
381  return -1;
382  }
383 
384  return 0;
385 }
386 
388 
392 int cmd_asn_transfer(vector<string> &args)
393 {
394  string cmd_name = "transfer";
395 
396  AsnTransfer act;
397  AsnTransferCmd *cmd = act.get_command();
398 
399  // mandatory field
400  bool hasOp = false;
401 
402  if (args.empty()) {
403  return cmd_asn_help("no ASN specified", cmd_name);
404  }
405 
406  int asn = atoi(args[0].c_str());
407  if (asn <= 0) {
408  return cmd_asn_help("invalid ASN: '" + args[0] + "'", cmd_name);
409  }
410  cmd->set_asn(asn);
411  args.erase(args.begin());
412 
413  while (!args.empty()) {
414  if (args[0] == "-op") {
415  //op
416  if (hasOp) {
417  return cmd_asn_help("only one operation allowed per command",
418  cmd_name);
419  } else {
420  hasOp = true;
421  }
422  args.erase(args.begin());
423  if (args.empty()) {
424  return cmd_asn_help("operation parameter missing", cmd_name);
425  }
426 
427  if (args[0] != "query" && args[0] != "request") {
428  return cmd_asn_help("invalid operation '" + args[0] + "'",
429  cmd_name);
430  }
431 
432  cmd->set_operation(args[0]);
433  args.erase(args.begin());
434  } else {
435  return cmd_asn_help("invalid syntax near \"" + args[0] + "\"",
436  cmd_name);
437  }
438  }
439 
440  if (!hasOp) {
441  return cmd_asn_help("no operation specified", cmd_name);
442  }
443 
444  if (_debug) {
445  printf("asn : [%d]\n", cmd->get_asn());
446  printf("op : [%s]\n", cmd->get_operation().c_str());
447  } // _debug
448 
449  if (process_action(act) != 0) {
450  return -1;
451  }
452 
453  return 0;
454 }
455 
457 
461 int cmd_asn_update(vector<string> &args)
462 {
463  string cmd_name = "update";
464 
465  AsnUpdate act;
466  AsnUpdateCmd *cmd = act.get_command();
467 
468  if (args.empty()) {
469  return cmd_asn_help("no ASN specified", cmd_name);
470  }
471 
472  int asn = atoi(args[0].c_str());
473  if (asn <= 0) {
474  return cmd_asn_help("invalid ASN: '" + args[0] + "'", cmd_name);
475  }
476  cmd->set_asn(asn);
477  args.erase(args.begin());
478 
479  bool hasOrganization = false;
480  bool hasContactsAdd = false;
481  bool hasContactsRem = false;
482  bool hasCreationDate = false;
483  bool hasAsIn = false;
484  bool hasAsOut = false;
485 
486  while (!args.empty()) {
487  if (args[0] == "-add-contact") {
488  //contact(s) to add
489  hasContactsAdd = true;
490  args.erase(args.begin());
491  if (args.empty()) {
492  return cmd_asn_help("add-contact parameter missing", cmd_name);
493  }
494 
495  string type;
496  string value;
497  if (SheppStrUtil::split(args[0], type, value, "=", false) != 0) {
498  return cmd_asn_help("invalid contact", cmd_name);
499  }
500 
501  cmd->insert_contact_add(type, value);
502  args.erase(args.begin());
503  } else if (args[0] == "-rem-contact") {
504  //contact(s) to remove
505  hasContactsRem = true;
506  args.erase(args.begin());
507  if (args.empty()) {
508  return cmd_asn_help("rem-contact parameter missing", cmd_name);
509  }
510 
511  string type;
512  string value;
513  if (SheppStrUtil::split(args[0], type, value, "=", false) != 0) {
514  return cmd_asn_help("invalid contact", cmd_name);
515  }
516 
517  cmd->insert_contact_rem(type, value);
518  args.erase(args.begin());
519  } else if (args[0] == "-o") {
520  //set organization
521  if (hasOrganization) {
522  return cmd_asn_help("only one organization allowed per command",
523  cmd_name);
524  } else {
525  hasOrganization = true;
526  }
527  args.erase(args.begin());
528  if (args.empty()) {
529  return cmd_asn_help("organization parameter missing", cmd_name);
530  }
531  cmd->set_organization(args[0]);
532  args.erase(args.begin());
533  } else if (args[0] == "-creation-date") {
534  if (hasCreationDate) {
535  return cmd_asn_help("only one creation-date allowed per command",
536  cmd_name);
537  } else {
538  hasCreationDate = true;
539  }
540  args.erase(args.begin());
541  if (args.empty()) {
542  return cmd_asn_help("organization parameter missing", cmd_name);
543  }
544  cmd->set_creation_date(args[0]);
545  args.erase(args.begin());
546 
547  } else if (args[0] == "-as-in-add") {
548  args.erase(args.begin());
549  if (args.empty()) {
550  return cmd_asn_help("as-in-add parameter missing", cmd_name);
551  }
552 
553  string asIn = args[0];
554  args.erase(args.begin());
555 
556  if (SheppStrUtil::quote_gathering(args, asIn) != 0) {
557  return cmd_asn_help("error setting as-in-add", cmd_name);
558  }
559 
560  cmd->insert_as_in_add(asIn);
561  hasAsIn = true;
562 
563  } else if (args[0] == "-as-in-rem") {
564  args.erase(args.begin());
565  if (args.empty()) {
566  return cmd_asn_help("as-in-rem parameter missing", cmd_name);
567  }
568 
569  string asIn = args[0];
570  args.erase(args.begin());
571 
572  if (SheppStrUtil::quote_gathering(args, asIn) != 0) {
573  return cmd_asn_help("error setting as-in-rem", cmd_name);
574  }
575 
576  cmd->insert_as_in_rem(asIn);
577  hasAsIn = true;
578 
579  } else if (args[0] == "-as-out-add") {
580  args.erase(args.begin());
581  if (args.empty()) {
582  return cmd_asn_help("as-out-add parameter missing", cmd_name);
583  }
584 
585  string asOut = args[0];
586  args.erase(args.begin());
587 
588  if (SheppStrUtil::quote_gathering(args, asOut) != 0) {
589  return cmd_asn_help("error setting as-out-add", cmd_name);
590  }
591 
592  cmd->insert_as_out_add(asOut);
593  hasAsOut = true;
594 
595  } else if (args[0] == "-as-out-rem") {
596  args.erase(args.begin());
597  if (args.empty()) {
598  return cmd_asn_help("as-out-rem parameter missing", cmd_name);
599  }
600 
601  string asOut = args[0];
602  args.erase(args.begin());
603 
604  if (SheppStrUtil::quote_gathering(args, asOut) != 0) {
605  return cmd_asn_help("error setting as-out-rem", cmd_name);
606  }
607 
608  cmd->insert_as_out_rem(asOut);
609  hasAsOut = true;
610 
611  } else {
612  return cmd_asn_help("invalid syntax near \"" + args[0] + "\"",
613  cmd_name);
614  }
615  }
616 
617  if (!hasOrganization && !hasContactsAdd && !hasContactsRem &&
618  !hasCreationDate && !hasAsIn && !hasAsOut) {
619  return cmd_asn_help("nothing to update", cmd_name);
620  }
621 
622  if (_debug) {
623  printf("ASN to be updated: [%d]\n", cmd->get_asn());
624  printf("organization: [%s]\n", cmd->get_organization().c_str());
625 
626  map< string, string, less<string> >::const_iterator cit;
627  map< string, string, less<string> > contacts;
628 
629  contacts = cmd->get_contacts_add();
630  for (cit = contacts.begin(); cit != contacts.end(); cit++) {
631  printf("contact to add %s: %s\n",
632  (*cit).first.c_str(), (*cit).second.c_str());
633  }
634 
635  contacts = cmd->get_contacts_rem();
636  for (cit = contacts.begin(); cit != contacts.end(); cit++) {
637  printf("contact to remove %s: %s\n",
638  (*cit).first.c_str(), (*cit).second.c_str());
639  }
640 
641  vector<string> asInAdd = cmd->get_as_in_add();
642  for (int i = 0; i < asInAdd.size(); i++) {
643  printf("as-in to add: %s\n", asInAdd[i].c_str());
644  }
645 
646  vector<string> asInRem = cmd->get_as_in_rem();
647  for (int i = 0; i < asInRem.size(); i++) {
648  printf("as-in to remove: %s\n", asInRem[i].c_str());
649  }
650 
651  vector<string> asOutAdd = cmd->get_as_in_add();
652  for (int i = 0; i < asOutAdd.size(); i++) {
653  printf("as-out to add: %s\n", asOutAdd[i].c_str());
654  }
655 
656  vector<string> asOutRem = cmd->get_as_in_rem();
657  for (int i = 0; i < asOutRem.size(); i++) {
658  printf("as-out to remove: %s\n", asOutRem[i].c_str());
659  }
660  } // _debug
661 
662  if (process_action(act) != 0) {
663  return -1;
664  }
665 
666  return 0;
667 }
668 
670 
674 int cmd_asn(vector<string> &args)
675 {
676  // asn command processing
677  if (!args.empty() && !(args[0] == "help")) {
678  if (args[0] == "check") {
679  args.erase(args.begin());
680  return cmd_asn_check(args);
681  } else if (args[0] == "create") {
682  args.erase(args.begin());
683  return cmd_asn_create(args);
684  } else if (args[0] == "delete") {
685  args.erase(args.begin());
686  return cmd_asn_delete(args);
687  } else if (args[0] == "info") {
688  args.erase(args.begin());
689  return cmd_asn_info(args);
690  } else if (args[0] == "renew") {
691  args.erase(args.begin());
692  return cmd_asn_renew(args);
693  } else if (args[0] == "transfer") {
694  args.erase(args.begin());
695  return cmd_asn_transfer(args);
696  } else if (args[0] == "update") {
697  args.erase(args.begin());
698  return cmd_asn_update(args);
699  } else {
700  return cmd_asn_help("invalid command: asn " + args[0]);
701  }
702  }
703 
704  return cmd_asn_help("");
705 }
706 
707 #endif //__ASN_FUNCTIONS_H__
void set_asn(const int asn)
Sets asn.
Definition: AsnRenewCmd.H:37
void set_asn(const int asn)
Sets asn.
Definition: AsnUpdateCmd.H:40
string get_expDate() const
Returns expiration date.
Definition: AsnRenewCmd.H:64
map< string, string, less< string > > get_contacts_add() const
Returns map of other contacts to be added.
Definition: AsnUpdateCmd.H:96
void insert_contact_rem(const string &type, const string &identification)
Inserts a contact to be removed.
Definition: AsnUpdateCmd.H:106
EPP AsnUpdate Class.
Definition: AsnUpdate.H:20
void insert_contact(const string &type, const string &identification)
Inserts a contact in the map of other contacts.
Definition: AsnCreateCmd.H:77
void set_organization(const string &organization)
Sets organization.
Definition: AsnCreateCmd.H:58
EPP AsnTransferCmd Class.
Definition: AsnTransferCmd.H:17
static int split(string input, string &first, string &second, string splitter, bool relaxed=false)
Definition: SheppStrUtil.H:120
void set_expDate(const string &expDate)
Sets expiration date.
Definition: AsnRenewCmd.H:55
AsnCreateCmd * get_command()
Returns raw pointer to the command.
Definition: AsnCreate.H:54
EPP AsnDelete Class.
Definition: AsnDeleteCmd.H:17
int get_asn() const
Returns asn.
Definition: AsnInfoCmd.H:41
vector< string > get_as_in_add() const
Returns list of all AS input policies to be added.
Definition: AsnUpdateCmd.H:133
EPP AsnCheck Class.
Definition: AsnCheck.H:21
int get_asn() const
Returns asn.
Definition: AsnRenewCmd.H:46
AsnUpdateCmd * get_command()
Returns raw pointer to the command.
Definition: AsnUpdate.H:53
EPP AsnDelete Class.
int cmd_asn_create(vector< string > &args)
asn create command function
Definition: AsnFunctions.H:122
void set_asn(const int asn)
Sets asn.
Definition: AsnTransferCmd.H:50
void insert_as_out_add(const string &policy)
Inserts an AS output policy to be added.
Definition: AsnUpdateCmd.H:160
void set_organization(const string &organization)
Sets organization.
Definition: AsnUpdateCmd.H:58
EPP AsnUpdate Class.
Definition: AsnUpdateCmd.H:25
int cmd_asn_renew(vector< string > &args)
asn renew command function
Definition: AsnFunctions.H:309
EPP AsnCheck Class.
Definition: AsnCheckCmd.H:17
void add_asn(const int asn)
Sets asn.
Definition: AsnCheckCmd.H:32
EPP AsnRenew Class.
void set_asn(const int asn)
Sets asn.
Definition: AsnDeleteCmd.H:32
vector< string > get_as_in_rem() const
Returns list of all AS input policies to be removed.
Definition: AsnUpdateCmd.H:151
EPP AsnInfo Class.
void set_operation(const string &op)
Sets operation.
Definition: AsnTransferCmd.H:32
EPP AsnCreate Class.
Definition: AsnCreateCmd.H:25
int cmd_asn_update(vector< string > &args)
asn update command function
Definition: AsnFunctions.H:461
int get_asn() const
Returns asn.
Definition: AsnTransferCmd.H:59
void insert_as_in_add(const string &policy)
Inserts an AS input policy to be added.
Definition: AsnUpdateCmd.H:124
void insert_as_out_rem(const string &policy)
Inserts an AS output policy to be removed.
Definition: AsnUpdateCmd.H:178
RegistrationPeriod get_period() const
Returns period.
Definition: AsnRenewCmd.H:84
int process_action(Action &act)
Send and EPP Action.
Definition: SheppCommandFunctions.H:871
EPP AsnUpdate Class.
EPP AsnCreate Class.
map< string, string, less< string > > get_contacts() const
Returns map of other contacts.
Definition: AsnCreateCmd.H:86
list< int > get_asn_list() const
Returns asn.
Definition: AsnCheckCmd.H:41
int cmd_asn_delete(vector< string > &args)
asn check delete function
Definition: AsnFunctions.H:241
int cmd_asn_help(string error_msg, string specific="")
print asn command usage info
Definition: AsnFunctions.H:24
AsnTransferCmd * get_command()
Returns raw pointer to the command.
Definition: AsnTransfer.H:54
EPP AsnCreate Class.
Definition: AsnCreate.H:21
void insert_as_in_rem(const string &policy)
Inserts an AS input policy to be removed.
Definition: AsnUpdateCmd.H:142
void set_period(const int time, const string &unit)
Sets period.
Definition: AsnRenewCmd.H:74
AsnInfoCmd * get_command()
Returns raw pointer to the command.
Definition: AsnInfo.H:54
string get_operation() const
Returns operation.
Definition: AsnTransferCmd.H:41
EPP AsnInfo Class.
Definition: AsnInfoCmd.H:17
EPP AsnRenew Class.
Definition: AsnRenew.H:21
EPP command-line shell client command functions include file.
void insert_contact_add(const string &type, const string &identification)
Inserts a contact to be added.
Definition: AsnUpdateCmd.H:87
EPP AsnCheck Class.
void set_asn(const int asn)
Sets asn.
Definition: AsnInfoCmd.H:32
static int quote_gathering(vector< string > &words, string &gather)
Gathers command-line arguments bounded by quotes in a string.
Definition: SheppStrUtil.H:152
int get_asn() const
Returns asn.
Definition: AsnUpdateCmd.H:49
AsnDeleteCmd * get_command()
Returns raw pointer to the command.
Definition: AsnDelete.H:53
string get_organization() const
Returns organization associated with the asn.
Definition: AsnCreateCmd.H:67
void insert_as_out(const string &as_out)
Sets output routing policy.
Definition: AsnCreateCmd.H:100
EPP AsnRenew Class.
Definition: AsnRenewCmd.H:22
AsnCheckCmd * get_command()
Returns raw pointer to the command.
Definition: AsnCheck.H:54
int get_asn() const
Returns asn.
Definition: AsnCreateCmd.H:49
map< string, string, less< string > > get_contacts_rem() const
Returns map of other contacts to be removed.
Definition: AsnUpdateCmd.H:115
int cmd_asn(vector< string > &args)
main asn command
Definition: AsnFunctions.H:674
EPP AsnDelete Class.
Definition: AsnDelete.H:20
void set_asn(const int asn)
Sets asn.
Definition: AsnCreateCmd.H:40
int get_asn() const
Returns asn.
Definition: AsnDeleteCmd.H:41
int cmd_asn_info(vector< string > &args)
asn info command function
Definition: AsnFunctions.H:275
AsnRenewCmd * get_command()
Returns raw pointer to the command.
Definition: AsnRenew.H:54
int cmd_asn_check(vector< string > &args)
asn check command function
Definition: AsnFunctions.H:80
string get_organization() const
Returns organization associated with the asn.
Definition: AsnUpdateCmd.H:67
EPP AsnTransfer Class.
EPP AsnTransfer Class.
Definition: AsnTransfer.H:21
int cmd_asn_transfer(vector< string > &args)
asn transfer command function
Definition: AsnFunctions.H:392
EPP AsnInfo Class.
Definition: AsnInfo.H:21