def update_layers(service):
 if (service.method == 'C'):
  _register_cascaded_layers(service)
 elif (service.type in ['WMS', 'OWS']):
  _register_indexed_layers(service)
 elif (service.type == 'REST'):
  _register_arcgis_layers(service)
 elif (service.type == 'CSW'):
  _harvest_csw(service)
 elif (service.type == 'OGP'):
  _harvest_ogp_layers(service, 25)

def update_layers ( service ) : if ( service . method == 'C' ) : _register_cascaded_layers ( service ) elif ( service . type in [ 'WMS' , 'OWS' ] ) : _register_indexed_layers ( service ) elif ( service . type == 'REST' ) : _register_arcgis_layers ( service ) elif ( service . type == 'CSW' ) : _harvest_csw ( service ) elif ( service . type == 'OGP' ) : _harvest_ogp_layers ( service , 25 )
import/update layers for an existing service .