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()
Exemple #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()
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'])
def given_there_are_no_devices_with_mac_group1(step, mac):
    provd_helper.delete_device_with_mac(mac)
Exemple #5
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'])
Exemple #6
0
def given_there_are_no_devices_with_mac_group1(step, mac):
    provd_helper.delete_device_with_mac(mac)