Esempio n. 1
0
    def setup_parser(self, parser):
        parser.add_option('--name',
                          dest='name',
                          help=_("activation key name (required)"))
        opt_parser_add_org(parser, required=1)
        parser.add_option('--environment',
                          dest='env',
                          help=_("new environment name e.g.: dev"))
        parser.add_option('--new_name',
                          dest='new_name',
                          help=_("new activation key name"))
        parser.add_option('--description',
                          dest='description',
                          help=_("new description"))
        opt_parser_add_content_view(parser)
        parser.add_option('--remove_content_view',
                          dest="remove_view",
                          action="store_true",
                          help=_("content view label eg: database"))
        parser.add_option('--limit',
                          dest='usage_limit',
                          help=_("usage limit (set -1 for no limit)"))

        parser.add_option('--add_subscription',
                          dest='add_poolid',
                          action='append',
                          help=_("add a pool to the activation key"))
        parser.add_option('--remove_subscription',
                          dest='remove_poolid',
                          action='append',
                          help=_("remove a pool from the activation key"))
Esempio n. 2
0
 def setup_parser(self, parser):
     super(Update, self).setup_parser(parser)
     parser.add_option('--name', dest='name', help=_('system name'))
     parser.add_option('--uuid',
                       dest='uuid',
                       help=constants.OPT_HELP_SYSTEM_UUID)
     parser.add_option('--new_name',
                       dest='new_name',
                       help=_('a new name for the system'))
     parser.add_option('--new_environment',
                       dest='new_environment',
                       help=_('a new environment name for the system'))
     parser.add_option('--description',
                       dest='description',
                       help=_('a description of the system'))
     parser.add_option('--location',
                       dest='location',
                       help=_("location of the system"))
     parser.add_option('--release',
                       dest='release',
                       help=_("value of $releasever for the system"))
     parser.add_option('--servicelevel',
                       dest='sla',
                       help=_("service level agreement"))
     opt_parser_add_content_view(parser)
     parser.add_option('--remove_content_view',
                       dest='remove_view',
                       action="store_true",
                       help=_("unset system's content view"))
Esempio n. 3
0
 def setup_parser(self, parser):
     parser.add_option("--name", dest="name", help=_("activation key name (required)"))
     opt_parser_add_org(parser, required=1)
     opt_parser_add_environment(parser, required=1)
     parser.add_option("--description", dest="description", help=_("activation key description"))
     opt_parser_add_content_view(parser)
     parser.add_option("--limit", dest="usage_limit", type="int", help=_("usage limit (unlimited by default)"))
Esempio n. 4
0
 def setup_parser(self, parser):
     parser.add_option("--repo_id", dest="repo_id", help=_("repository ID"))
     parser.add_option("--repo", dest="repo", help=_("repository name (required)"))
     opt_parser_add_org(parser, required=1)
     opt_parser_add_environment(parser, default=_("Library"))
     opt_parser_add_product(parser)
     opt_parser_add_content_view(parser)
Esempio n. 5
0
 def setup_parser(self, parser):
     opt_parser_add_org(parser, required=1)
     opt_parser_add_environment(parser, default="Library")
     opt_parser_add_product(parser)
     opt_parser_add_content_view(parser)
     parser.add_option(
         "--include_disabled", action="store_true", dest="disabled", help=_("list also disabled repositories")
     )
Esempio n. 6
0
 def setup_parser(self, parser):
     parser.add_option('--repo_id', dest='repo_id',
                       help=_("repository ID"))
     parser.add_option('--repo', dest='repo',
                       help=_("repository name (required unless repo_id is passed)"))
     opt_parser_add_org(parser, required=1)
     opt_parser_add_environment(parser, default="Library")
     opt_parser_add_product(parser)
     opt_parser_add_content_view(parser)
Esempio n. 7
0
 def setup_parser(self, parser):
     parser.add_option('--repo_id', dest='repo_id', help=_("repository ID"))
     parser.add_option('--repo',
                       dest='repo',
                       help=_("repository name (required)"))
     opt_parser_add_org(parser, required=1)
     opt_parser_add_environment(parser, default="Library")
     opt_parser_add_product(parser, required=1)
     opt_parser_add_content_view(parser)
Esempio n. 8
0
 def set_repo_select_options(cls, parser, select_by_env=True, select_by_cv=True):
     parser.add_option("--id", dest="id", help=_("repository ID"))
     parser.add_option("--name", dest="name", help=_("repository name"))
     opt_parser_add_org(parser)
     opt_parser_add_product(parser)
     if select_by_env:
         opt_parser_add_environment(parser, default="Library")
     if select_by_cv:
         opt_parser_add_content_view(parser)
Esempio n. 9
0
 def setup_parser(self, parser):
     super(Register, self).setup_parser(parser)
     parser.add_option('--name', dest='name', help=_("system name"))
     parser.add_option('--servicelevel', dest='sla', help=_("service level agreement"))
     parser.add_option('--activationkey', dest='activationkey',
         help=_("activation key, more keys are separated with comma e.g. --activationkey=key1,key2"))
     parser.add_option('--release', dest='release', help=_("values of $releasever for the system"))
     parser.add_option('--fact', dest='fact', action='append', nargs=2, metavar="KEY VALUE",
                            help=_("system facts"))
     opt_parser_add_content_view(parser)
Esempio n. 10
0
 def setup_parser(self, parser):
     parser.add_option('--id', dest='id',
                            help=_("errata ID, string value (required)"))
     parser.add_option('--repo_id', dest='repo_id',
                   help=_("repository ID"))
     parser.add_option('--repo', dest='repo',
                   help=_("repository name (required)"))
     opt_parser_add_org(parser, required=1)
     opt_parser_add_environment(parser, default=_("Library"))
     opt_parser_add_product(parser)
     opt_parser_add_content_view(parser)
Esempio n. 11
0
 def setup_parser(self, parser):
     mode = get_katello_mode()
     parser.add_option('--name', dest='name',
                            help=_("activation key name (required)"))
     opt_parser_add_org(parser, required=1)
     parser.add_option('--description', dest='description',
                            help=_("activation key description"))
     if mode == 'katello':
         opt_parser_add_environment(parser, required=1)
         opt_parser_add_content_view(parser)
     parser.add_option('--limit', dest='usage_limit', type="int",
                            help=_("usage limit (unlimited by default)"))
Esempio n. 12
0
 def setup_parser(self, parser):
     # always provide --id option for create, even on registered clients
     parser.add_option('--id', dest='id',
                            help=_("package ID, string value (required)"))
     parser.add_option('--repo_id', dest='repo_id',
                   help=_("repository ID"))
     parser.add_option('--repo', dest='repo',
                   help=_("repository name (required)"))
     opt_parser_add_org(parser, required=1)
     opt_parser_add_environment(parser, default="Library")
     opt_parser_add_product(parser)
     opt_parser_add_content_view(parser)
Esempio n. 13
0
 def setup_parser(self, parser):
     # always provide --id option for create, even on registered clients
     parser.add_option('--id',
                       dest='id',
                       help=_("package ID, string value (required)"))
     parser.add_option('--repo_id', dest='repo_id', help=_("repository ID"))
     parser.add_option('--repo',
                       dest='repo',
                       help=_("repository name (required)"))
     opt_parser_add_org(parser, required=1)
     opt_parser_add_environment(parser, default="Library")
     opt_parser_add_product(parser)
     opt_parser_add_content_view(parser)
Esempio n. 14
0
    def setup_parser(self, parser):
        parser.add_option('--repo_id', dest='repo_id',
                      help=_("repository ID"))
        parser.add_option('--repo', dest='repo',
                      help=_("repository name"))
        opt_parser_add_org(parser, required=1)
        opt_parser_add_environment(parser, default="Library")
        opt_parser_add_product(parser)
        opt_parser_add_content_view(parser)

        parser.add_option('--type', dest='type',
                      help=_("filter errata by type eg: enhancements"))
        parser.add_option('--severity', dest='severity',
                      help=_("filter errata by severity"))
Esempio n. 15
0
    def setup_parser(self, parser):
        parser.add_option('--repo_id', dest='repo_id', help=_("repository ID"))
        parser.add_option('--repo', dest='repo', help=_("repository name"))
        opt_parser_add_org(parser, required=1)
        opt_parser_add_environment(parser, default="Library")
        opt_parser_add_product(parser)
        opt_parser_add_content_view(parser)

        parser.add_option('--type',
                          dest='type',
                          help=_("filter errata by type eg: enhancements"))
        parser.add_option('--severity',
                          dest='severity',
                          help=_("filter errata by severity"))
Esempio n. 16
0
 def setup_parser(self, parser):
     parser.add_option('--name',
                       dest='name',
                       help=_("activation key name (required)"))
     opt_parser_add_org(parser, required=1)
     opt_parser_add_environment(parser, required=1)
     parser.add_option('--description',
                       dest='description',
                       help=_("activation key description"))
     opt_parser_add_content_view(parser)
     parser.add_option('--limit',
                       dest='usage_limit',
                       type="int",
                       help=_("usage limit (unlimited by default)"))
Esempio n. 17
0
    def setup_parser(self, parser):
        parser.add_option('--name', dest='name',
                               help=_("activation key name (required)"))
        opt_parser_add_org(parser, required=1)
        parser.add_option('--environment', dest='env',
                               help=_("new environment name e.g.: dev"))
        parser.add_option('--new_name', dest='new_name',
                              help=_("new activation key name"))
        parser.add_option('--description', dest='description',
                               help=_("new description"))
        opt_parser_add_content_view(parser)
        parser.add_option('--limit', dest='usage_limit',
                               help=_("usage limit (set -1 for no limit)"))

        parser.add_option('--add_subscription', dest='add_poolid', action='append',
                               help=_("add a pool to the activation key"))
        parser.add_option('--remove_subscription', dest='remove_poolid', action='append',
                               help=_("remove a pool from the activation key"))
Esempio n. 18
0
 def setup_parser(self, parser):
     super(Update, self).setup_parser(parser)
     parser.add_option('--name', dest='name',
                    help=_('system name'))
     parser.add_option('--uuid', dest='uuid',
                    help=constants.OPT_HELP_SYSTEM_UUID)
     parser.add_option('--new_name', dest='new_name',
                    help=_('a new name for the system'))
     parser.add_option('--new_environment', dest='new_environment',
                    help=_('a new environment name for the system'))
     parser.add_option('--description', dest='description',
                    help=_('a description of the system'))
     parser.add_option('--location', dest='location',
                    help=_("location of the system"))
     parser.add_option('--release', dest='release',
                    help=_("value of $releasever for the system"))
     parser.add_option('--servicelevel', dest='sla',
                    help=_("service level agreement"))
     opt_parser_add_content_view(parser)
Esempio n. 19
0
    def setup_parser(self, parser):
        parser.add_option("--name", dest="name", help=_("activation key name (required)"))
        opt_parser_add_org(parser, required=1)
        parser.add_option("--environment", dest="env", help=_("new environment name e.g.: dev"))
        parser.add_option("--new_name", dest="new_name", help=_("new activation key name"))
        parser.add_option("--description", dest="description", help=_("new description"))
        opt_parser_add_content_view(parser)
        parser.add_option(
            "--remove_content_view", dest="remove_view", action="store_true", help=_("content view label eg: database")
        )
        parser.add_option("--limit", dest="usage_limit", help=_("usage limit (set -1 for no limit)"))

        parser.add_option(
            "--add_subscription", dest="add_poolid", action="append", help=_("add a pool to the activation key")
        )
        parser.add_option(
            "--remove_subscription",
            dest="remove_poolid",
            action="append",
            help=_("remove a pool from the activation key"),
        )
Esempio n. 20
0
 def setup_parser(self, parser):
     super(Register, self).setup_parser(parser)
     parser.add_option('--name', dest='name', help=_("system name"))
     parser.add_option('--servicelevel',
                       dest='sla',
                       help=_("service level agreement"))
     parser.add_option(
         '--activationkey',
         dest='activationkey',
         help=
         _("activation key, more keys are separated with comma e.g. --activationkey=key1,key2"
           ))
     parser.add_option('--release',
                       dest='release',
                       help=_("values of $releasever for the system"))
     parser.add_option('--fact',
                       dest='fact',
                       action='append',
                       nargs=2,
                       metavar="KEY VALUE",
                       help=_("system facts"))
     opt_parser_add_content_view(parser)
 def setup_parser(self, parser):
     self._add_get_cvd_opts(parser)
     opt_parser_add_org(parser, required=1)
     opt_parser_add_content_view(parser, required=1)
 def setup_parser(self, parser):
     self._add_get_cvd_opts(parser)
     opt_parser_add_org(parser, required=1)
     opt_parser_add_content_view(parser, required=1)