Example #1
0
def when_i_create_the_device_with_infos(step):
    common.open_url('device', 'add')
    device_infos = step.hashes[0]
    if 'mac' in device_infos:
        provd_helper.delete_device_with_mac(device_infos['mac'])
        device_action_webi.type_input('mac', device_infos['mac'])
    if 'ip' in device_infos:
        provd_helper.delete_device_with_ip(device_infos['ip'])
        device_action_webi.type_input('ip', device_infos['ip'])
    if 'plugin' in device_infos:
        device_action_webi.type_input('plugin', device_infos['plugin'])
    if 'template_id' in device_infos:
        device_action_webi.type_select('template_id', device_infos['template_id'])
    form.submit.submit_form()
Example #2
0
def when_i_create_the_device_with_infos(step):
    common.open_url('device', 'add')
    device_infos = step.hashes[0]
    if 'mac' in device_infos:
        provd_helper.delete_device_with_mac(device_infos['mac'])
        device_action_webi.type_input('mac', device_infos['mac'])
    if 'ip' in device_infos:
        provd_helper.delete_device_with_ip(device_infos['ip'])
        device_action_webi.type_input('ip', device_infos['ip'])
    if 'plugin' in device_infos:
        device_action_webi.type_input('plugin', device_infos['plugin'])
    if 'template_id' in device_infos:
        device_action_webi.type_select('template_id',
                                       device_infos['template_id'])
    form.submit.submit_form()
Example #3
0
def delete_similar_devices(device):
    if 'mac' in device:
        provd_helper.delete_device_with_mac(device['mac'])
    if 'ip' in device:
        provd_helper.delete_device_with_ip(device['ip'])
Example #4
0
def delete_similar_devices(device):
    if 'mac' in device:
        provd_helper.delete_device_with_mac(device['mac'])
    if 'ip' in device:
        provd_helper.delete_device_with_ip(device['ip'])