コード例 #1
0
def _blade_scan(ip_address):
    ssh = _connect_ssh(ip_address)
    lines = ssh.ibm_command('list -l a')
    tree = parse.tree(lines=lines)
    if 'system' not in tree:
        raise TreeError('"system" not found in the device tree')
    device = _prepare_devices(ssh, ip_address, '', 'system', tree['system'])
    return device
コード例 #2
0
def run_ssh_bladecenter(ip):
    ssh = _connect_ssh(ip)
    lines = ssh.ibm_command('list -l a')
    tree = parse.tree(lines=lines)
    if 'system' not in tree:
        raise TreeError('"system" not found in the device tree')
    dev = _recursive_add_dev(ssh, ip, '', 'system', tree['system'])
    return dev.name
コード例 #3
0
ファイル: ssh_ibm_bladecenter.py プロジェクト: 4i60r/ralph
def _blade_scan(ip_address):
    ssh = _connect_ssh(ip_address)
    lines = ssh.ibm_command('list -l a')
    tree = parse.tree(lines=lines)
    if 'system' not in tree:
        raise TreeError('"system" not found in the device tree')
    device = _prepare_devices(ssh, ip_address, '', 'system', tree['system'])
    return device
コード例 #4
0
def run_ssh_bladecenter(ip):
    ssh = _connect_ssh(ip)
    lines = ssh.ibm_command('list -l a')
    tree = parse.tree(lines=lines)
    if 'system' not in tree:
        raise TreeError('"system" not found in the device tree')
    dev = _recursive_add_dev(ssh, ip, '', 'system', tree['system'])
    return dev.name