'operate ipv4 static route'

def operate_static_route(self, version, prefix, mask, nhp_interface, next_hop, vrf, destvrf, state):

    description_xml = '\n'
    preference_xml = '\n'
    tag_xml = '\n'
    if (next_hop is None):
        next_hop = '0.0.0.0'
    if (nhp_interface is None):
        nhp_interface = 'Invalid0'
    if (vrf is None):
        vpn_instance = '_public_'
    else:
        vpn_instance = vrf
    if (destvrf is None):
        dest_vpn_instance = '_public_'
    else:
        dest_vpn_instance = destvrf
    if self.description:
        description_xml = (CE_NC_SET_DESCRIPTION % self.description)
    if self.pref:
        preference_xml = (CE_NC_SET_PREFERENCE % self.pref)
    if self.tag:
        tag_xml = (CE_NC_SET_TAG % self.tag)
    if (state == 'present'):
        configxmlstr = (CE_NC_SET_STATIC_ROUTE % (vpn_instance, version, prefix, mask, nhp_interface, dest_vpn_instance, next_hop, description_xml, preference_xml, tag_xml))
    else:
        configxmlstr = (CE_NC_DELETE_STATIC_ROUTE % (vpn_instance, version, prefix, mask, nhp_interface, dest_vpn_instance, next_hop))
    conf_str = build_config_xml(configxmlstr)
    recv_xml = set_nc_config(self.module, conf_str)
    self.check_response(recv_xml, 'OPERATE_STATIC_ROUTE')
