Esempio n. 1
0
        'rbaNode': '/debug/generate/dump',
        'mode': 'binary',
    },
    'snapshot': {
        'dir': '/var/opt/tms/snapshots',
        'rbaNode': '/rbm_fake/debug/download/snapshot',
        'mode': 'binary',
    },
    'tcpdump': {
        'dir': '/var/opt/tms/tcpdumps',
        'rbaNode': '/rbm_fake/debug/generate/tcpdump',
        'mode': 'binary',
    }
}

if RVBDUtils.isCMC():
    _TARGETS['apptcpdump'] = {
        'dir': '/var/opt/tms/tcpdumps/appliance',
        'rbaNode': '/rbm_fake/debug/generate/tcpdump',
        'mode': 'binary',
    }

if RVBDUtils.isRspSupported():
    import rsp
    _TARGETS['rspbackup'] = {
        'dir': rsp.rsp_backupdir,
        'rbaNode': '/rbt/rsp2/action/backup/create',
        'mode': 'binary'
    }

if RVBDUtils.isGW():
Esempio n. 2
0
import Logging
import OSUtils
import HTTPUtils
import Nodes
import FormUtils
import GfxUtils
import GraphUtils
from PagePresentation import PagePresentation
from XMLContent import XMLContent
import logDownload

basicPathName = "/var/opt/tms/"
allowedDirs = ["sysdumps", "snapshots", "tcpdumps"]

# Enable these booleans if per-product code is needed.
isCMC = RVBDUtils.isCMC()
# isIB  = RVBDUtils.isIB()
isSH  = RVBDUtils.isSH()

def findSysFiles(directory="sysdumps"):
    if directory not in allowedDirs:
        raise OSError, "%s is not a permitted system file category." % directory
    path = basicPathName + directory
    sysFiles = [f for f in os.listdir(path)
        if not f.startswith('.')
        and stat.S_ISREG(os.stat("%s/%s" % (path, f))[stat.ST_MODE])]
    sysFiles.sort()
    return sysFiles

class gui_Diagnostics(PagePresentation):
    # actions handled here