'Judge whether BGP view has existed'

def is_bgp_view_exist(self):

    if self.bgp_instance:
        view_cmd = ('bgp    %s    instance    %s' % (self.as_number, self.bgp_instance))
    else:
        view_cmd = ('bgp    %s' % self.as_number)
    return is_config_exist(self.config, view_cmd)
