- Read and complete the Contributor License Agreement.
- When complete, email a PDF of the signed agreement to [email protected].
- Once you have received a confirmation that your signed CLA was received, contribute your code, documentation, or any other materials with a pull request.
- PEP8
- Indents are 4 whitespaces
-
Creating a new parser off of the main subparser
'show', help='sub-command for showing objects' )```
-
Create a new subparser off of parent subparser
subparser_show = parser_show.add_subparsers(dest='subparser_name')
-
Create parser
subparser_show.add_parser('lb-vservers', help='Shows all lb vservers')
-
'vserver', help='Shows stats for specified vserver' )```
-
-
Create new method under respective class
def lbvservers(self): ns_object = ["lbvserver"] list_of_lbvservers = [] try: output = self.client.get_object(ns_object) except RuntimeError as e: msg = "Problem while trying to get list of LB vservers " \ "on %s.\n%s" % (self.args.host, e) raise RuntimeError(msg) for vserver in output['lbvserver']: list_of_lbvservers.append(vserver['name']) utils.print_list(sorted(list_of_lbvservers))