Exemplo n.º 1
0
 def validate(self, parser, options, args):
     Cmd.validate(self, parser, options, args, load_cluster=True)
     try:
         self.setting = common.parse_settings(args)
     except common.ArgumentError as e:
         print_(str(e), file=sys.stderr)
         exit(1)
Exemplo n.º 2
0
 def validate(self, parser, options, args):
     Cmd.validate(self, parser, options, args, load_cluster=True)
     try:
         self.setting = common.parse_settings(args)
     except common.ArgumentError as e:
         print_(str(e), file=sys.stderr)
         exit(1)
Exemplo n.º 3
0
 def validate(self, parser, options, args):
     Cmd.validate(self, parser, options, args, node_name=True, load_cluster=True)
     args = args[1:]
     try:
         self.setting = common.parse_settings(args)
     except common.ArgumentError as e:
         print >> sys.stderr, str(e)
         exit(1)
Exemplo n.º 4
0
 def validate(self, parser, options, args):
     Cmd.validate(self, parser, options, args, node_name=True, load_cluster=True)
     args = args[1:]
     try:
         self.setting = common.parse_settings(args, literal_yaml=self.options.literal_yaml)
     except common.ArgumentError as e:
         print_(str(e), file=sys.stderr)
         exit(1)
Exemplo n.º 5
0
 def validate(self, parser, options, args):
     Cmd.validate(self, parser, options, args, node_name=True, load_cluster=True)
     args = args[1:]
     try:
         self.setting = common.parse_settings(args)
     except common.ArgumentError as e:
         print >> sys.stderr, str(e)
         exit(1)
Exemplo n.º 6
0
 def validate(self, parser, options, args):
     Cmd.validate(self, parser, options, args, node_name=True, load_cluster=True)
     args = args[1:]
     try:
         self.setting = common.parse_settings(args, literal_yaml=self.options.literal_yaml)
     except common.ArgumentError as e:
         print_(str(e), file=sys.stderr)
         exit(1)
Exemplo n.º 7
0
 def validate(self, parser, options, args):
     Cmd.validate(self, parser, options, args, load_cluster=True)
     try:
         self.setting = common.parse_settings(args, literal_yaml=self.options.literal_yaml)
         if self.options.cl_batch and self.options.cl_periodic:
             print_("Can't set commitlog to be both batch and periodic.{}".format(os.linesep))
             parser.print_help()
             exit(1)
     except common.ArgumentError as e:
         print_(str(e), file=sys.stderr)
         exit(1)
 def validate(self, parser, options, args):
     Cmd.validate(self, parser, options, args, load_cluster=True)
     try:
         self.setting = common.parse_settings(args, literal_yaml=self.options.literal_yaml)
         if self.options.cl_batch and self.options.cl_periodic:
             print_("Can't set commitlog to be both batch and periodic.{}".format(os.linesep))
             parser.print_help()
             exit(1)
     except common.ArgumentError as e:
         print_(str(e), file=sys.stderr)
         exit(1)
Exemplo n.º 9
0
    def validate(self, parser, options, args):
        Cmd.validate(self, parser, options, args, load_cluster=True)
        try:
            self.setting = common.parse_settings(args)
        except common.ArgumentError as e:
            print_(str(e), file=sys.stderr)
            exit(1)

        if self.options.yaml_file is not None:
            if not os.path.exists(self.options.yaml_file):
                print_("%s does not appear to be a valid file" % self.options.yaml_file)
                exit(1)
Exemplo n.º 10
0
    def validate(self, parser, options, args):
        Cmd.validate(self, parser, options, args, load_cluster=True)
        try:
            self.setting = common.parse_settings(args)
        except common.ArgumentError as e:
            print_(str(e), file=sys.stderr)
            exit(1)

        if self.options.yaml_file is not None:
            if not os.path.exists(self.options.yaml_file):
                print_("%s does not appear to be a valid file" %
                       self.options.yaml_file)
                exit(1)