A function to connect to a zenoss server and add a new device entry.

    Parameters:
        device:         (Optional) Will use the grain 'fqdn' by default.
        device_class:   (Optional) The device class to use. If none, will determine based on kernel grain.
        collector:      (Optional) The collector to use for this device. Defaults to 'localhost'.
        prod_state:     (Optional) The prodState to set on the device. If none, defaults to 1000 ( production )

    CLI Example:
        salt '*' zenoss.add_device

def add_device(device=None, device_class=None, collector='localhost', prod_state=1000):
    '''
    A function to connect to a zenoss server and add a new device entry.

    Parameters:
        device:         (Optional) Will use the grain 'fqdn' by default.
        device_class:   (Optional) The device class to use. If none, will determine based on kernel grain.
        collector:      (Optional) The collector to use for this device. Defaults to 'localhost'.
        prod_state:     (Optional) The prodState to set on the device. If none, defaults to 1000 ( production )

    CLI Example:
        salt '*' zenoss.add_device
    '''

    if not device:
        device = __salt__['grains.get']('fqdn')

    if not device_class:
        device_class = _determine_device_class()
    log.info('Adding device %s to zenoss', device)
    data = dict(deviceName=device, deviceClass=device_class, model=True, collector=collector, productionState=prod_state)
    response = _router_request('DeviceRouter', 'addDevice', data=[data])
    return response