@rest_initialiser(version_check=True)
def execute(self, opts):
    if (not (opts.enable or opts.list)):
        _exit_if_errors(['--enable or --list must be provided'])
    if (opts.enable and opts.list):
        _exit_if_errors(['cannot provide both --enable and --list'])
    if opts.enable:
        confirm = input('Developer preview cannot be disabled once it is enabled. If you enter developer preview mode you will not be able to upgrade. DO NOT USE IN PRODUCTION.\nAre you sure [y/n]: ')
        if (confirm == 'y'):
            (_, errors) = self.rest.set_dp_mode()
            _exit_if_errors(errors)
            _success('Cluster is in developer preview mode')
        elif (confirm == 'n'):
            _success('Developer preview mode has NOT been enabled')
        else:
            _exit_if_errors(['Unknown option provided'])
    if opts.list:
        (pools, rv) = self.rest.pools()
        _exit_if_errors(rv)
        if (('isDeveloperPreview' in pools) and pools['isDeveloperPreview']):
            print('Cluster is in developer preview mode')
        else:
            print('Cluster is NOT in developer preview mode')
@rest_initialiser(version_check=True)
def execute(self, opts):
    if (not (opts.enable or opts.list)):
        _exit_if_errors(['--enable or --list must be provided'])
    if (opts.enable and opts.list):
        _exit_if_errors(['cannot provide both --enable and --list'])
    if opts.enable:
        confirm = input('Developer preview cannot be disabled once it is enabled. If you enter developer preview mode you will not be able to upgrade. DO NOT USE IN PRODUCTION.\nAre you sure [y/n]: ')
        if (confirm == 'y'):
            (_, errors) = self.rest.set_dp_mode()
            _exit_if_errors(errors)
            _success('Cluster is in developer preview mode')
        elif (confirm == 'n'):
            _success('Developer preview mode has NOT been enabled')
        else:
            _exit_if_errors(['Unknown option provided'])
    if opts.list:
        (pools, rv) = self.rest.pools()
        _exit_if_errors(rv)
        if (('isDeveloperPreview' in pools) and pools['isDeveloperPreview']):
            print('Cluster is in developer preview mode')
        else:
            print('Cluster is NOT in developer preview mode')