示例#1
0
    def set(self, name=None, option='print'):

        if not name:
            print('PLEASE ENTER AN INTERFACE VALUE!')
        else:
            if validation.globval(self.sshclient):
                if validation.intval(self.sshclient, name):
                    paramlist = [
                        'diagnose hardware deviceinfo nic {}'.format(name)
                    ]
                else:
                    print('\"{}\" is not in the physical interfaces list!'.
                          format(name))
            else:
                if validation.intval(self.sshclient, name):
                    paramlist = [
                        'config global',
                        'diagnose hardware deviceinfo nic {}'.format(name)
                    ]
                else:
                    print('\"{}\" is not in the physical interfaces list!'.
                          format(name))

        try:
            return storeprint(self.sshclient, paramlist, option)
        except:
            print('Incorrect VDOM/GLOBAL!')
示例#2
0
    def set(self, flt='', option='print'):
        precomm = """config global
        """
        command = """diagnose sys ha checksum cluster
        """

        stdout = vdomfunc(self.sshclient, 'global', precomm, command)
        return storeprint(stdout, option)
示例#3
0
    def set(self, flt='', option='print'):
        precomm = """config global
        """
        command = """diagnose deb crashlog read {}
        """.format(flt)

        stdout = vdomfunc(self.sshclient, 'global', precomm, command)
        return storeprint(stdout, option)
示例#4
0
    def set(self, vdom=None, edit=None, option='print'):

        if not vdom:
            if not edit:
                print('PLEASE ENTER AN EDIT VALUE!')
            else:
                paramlist = ['diagnose firewall iprope 100004 {}'.format(edit)]
        elif validation.vdomval(self.sshclient, vdom):
            if not edit:
                print('PLEASE ENTER AN EDIT VALUE!')
            else:
                paramlist = [
                    'diagnose firewall iprope show 100004 {}\n'.format(edit)
                ]
                precomm = """config vdom
                edit {}
                """.format(vdom)
                command = paramlist[-1]
                stdout = vdomfunc(self.sshclient, vdom, precomm, command)
        try:
            return storeprint(stdout, option)
        except:
            print('Incorrect VDOM/GLOBAL!')
示例#5
0
    def set(self, flt='list', option='print'):

        paramlist = ['diagnose dvm device {}'.format(flt)]

        stdout = vdomfunc(self.sshclient, None, None, paramlist[0])
        return storeprint(stdout, option)