'get ip static route'

def get_ip_static_route(self):

    if (self.aftype == 'v4'):
        version = 'ipv4unicast'
    else:
        version = 'ipv6unicast'
    change = False
    self.get_static_route(self.state)
    if (self.state == 'present'):
        for static_route in self.static_routes_info['sroute']:
            if self.is_prefix_exist(static_route, version):
                if self.vrf:
                    if (static_route['vrfName'] != self.vrf):
                        change = True
                if self.tag:
                    if (static_route['tag'] != self.tag):
                        change = True
                if self.destvrf:
                    if (static_route['destVrfName'] != self.destvrf):
                        change = True
                if self.description:
                    if (static_route['description'] != self.description):
                        change = True
                if self.pref:
                    if (static_route['preference'] != self.pref):
                        change = True
                if self.nhp_interface:
                    if (static_route['ifName'].lower() != self.nhp_interface.lower()):
                        change = True
                if self.next_hop:
                    if (static_route['nexthop'].lower() != self.next_hop.lower()):
                        change = True
                return change
            else:
                continue
        change = True
    else:
        for static_route in self.static_routes_info['sroute']:
            if (static_route['nexthop'] and self.next_hop):
                if ((static_route['prefix'].lower() == self.prefix.lower()) and (static_route['maskLength'] == self.mask) and (static_route['nexthop'].lower() == self.next_hop.lower()) and (static_route['afType'] == version)):
                    change = True
                    return change
            if (static_route['ifName'] and self.nhp_interface):
                if ((static_route['prefix'].lower() == self.prefix.lower()) and (static_route['maskLength'] == self.mask) and (static_route['ifName'].lower() == self.nhp_interface.lower()) and (static_route['afType'] == version)):
                    change = True
                    return change
            else:
                continue
        change = False
    return change
