def check_service(protocol=None, service_address=None, **kwargs):
 cmd = '{0}'.format(_build_cmd(protocol=protocol, service_address=service_address, **kwargs))
 if (not kwargs):
  cmd += ' '
 all_rules = get_rules()
 out = all_rules.find(cmd)
 if (out != (-1)):
  ret = True
 else:
  ret = 'Error: service not exists'
 return ret

def check_service ( protocol = None , service_address = None , ** kwargs ) : cmd = '{0}' . format ( _build_cmd ( protocol = protocol , service_address = service_address , ** kwargs ) ) if ( not kwargs ) : cmd += ' ' all_rules = get_rules ( ) out = all_rules . find ( cmd ) if ( out != ( - 1 ) ) : ret = True else : ret = 'Error: service not exists' return ret
check the virtual service exists .