Given the following NAPALM grains, we can determine the Capirca platform name:

    - vendor
    - device model
    - operating system

    Not the most optimal.

def _get_capirca_platform():  # pylint: disable=too-many-return-statements
    '''
    Given the following NAPALM grains, we can determine the Capirca platform name:

    - vendor
    - device model
    - operating system

    Not the most optimal.
    '''
    vendor = __grains__['vendor'].lower()
    os_ = __grains__['os'].lower()
    model = __grains__['model'].lower()
    if vendor == 'juniper' and 'srx' in model:
        return 'junipersrx'
    elif vendor == 'cisco' and os_ == 'ios':
        return 'cisco'
    elif vendor == 'cisco' and os_ == 'iosxr':
        return 'ciscoxr'
    elif vendor == 'cisco' and os_ == 'asa':
        return 'ciscoasa'
    elif os_ == 'linux':
        return 'iptables'
    elif vendor == 'palo alto networks':
        return 'paloaltofw'
    # anything else will point to the vendor
    # i.e.: some of the Capirca platforms are named by the device vendor
    # e.g.: eOS => arista, junos => juniper, etc.
    return vendor