@rest_initialiser(version_check=True)
def execute(self, opts):
    flags_used = sum([opts.set, opts.get])
    if (flags_used == 0):
        _exit_if_errors(['Please provide one of --set, or --get'])
    elif (flags_used > 1):
        _exit_if_errors(['Please provide only one of --set, or --get'])
    if opts.get:
        self._get(self.rest)
    if opts.set:
        if (sum([opts.ipv6, opts.ipv4]) != 1):
            _exit_if_errors(['Provided exactly one of --ipv4 or --ipv6 together with the --set option'])
        self._set(self.rest, opts.ipv6, opts.ssl)
@rest_initialiser(version_check=True)
def execute(self, opts):
    flags_used = sum([opts.set, opts.get])
    if (flags_used == 0):
        _exit_if_errors(['Please provide one of --set, or --get'])
    elif (flags_used > 1):
        _exit_if_errors(['Please provide only one of --set, or --get'])
    if opts.get:
        self._get(self.rest)
    if opts.set:
        if (sum([opts.ipv6, opts.ipv4]) != 1):
            _exit_if_errors(['Provided exactly one of --ipv4 or --ipv6 together with the --set option'])
        self._set(self.rest, opts.ipv6, opts.ssl)