Previous topic

FSConfiguration

Next topic

TiersOfATLAS API

AGIS API

class agis.api.AGIS.AGIS(**kwargs)

AGIS client to send requests to AGIS server.

Author :Alexey Anisenkov
Revision :$Id: AGIS.py 884 2013-02-03 20:20:09Z anisyonk $
__init__(**kwargs)

Class constuctor

Parameters:
  • host – host name, ignored if hostp parameter given
  • host – port number, ignored if hostp parameter given
  • hostp – string in format “host:port”

Methods

__init__(**kwargs) Class constuctor
add_frontier_service(**kwargs) Add Frontier service associated with given site identified by site_id or site_name.
add_panda_swrelease(**kwargs) Associate SWRelease object with PandaResource.
add_service_node(**kwargs) Add new ServiceNode to the Service.
add_squid_service(**kwargs) Add Squid service (Frontier or CVMFS related one) associated with given site identified by site_id or site_name.
add_swrelease(**kwargs) Add SWRelease object into DB.
attributes()
get_closesites(**kwargs) Get close sites relations for given ddmendpoint.
get_closesites_names(**kwargs) Get close sites names by given criteria.
get_data()
get_data_values([fields])
get_seinfo_entry(**kwargs) Get seinfo entry by given site name (special function for dq2.info compatibility).
get_site_status(**kwargs) Retrieve status for sites by given criteria.
get_storage_element(**kwargs) Get info about StorageElement (deprecated).
get_storage_info(**kwargs) Get LFC endpoint and list of DDMEndpoints for given cloud and closeSE (dq2.info special function).
init_from_data(data)
is_equal(o1, o2[, exclude])
list_activity_types(**kwargs) Get ADC activity types.
list_ce_services(**kwargs) Retrieve list of CEs associated with site.
list_clouds(**kwargs) Retrieve list of cloud objects.
list_clouds_names(**kwargs) Retrieve list of cloud names.
list_ddmactivity_types(**kwargs) Get DDM transfer activity types.
list_ddmendpointnames_by_surl(**kwargs) List of DDMEndpoint names by given surl (matched against se domain pattern).
list_ddmendpoints_permissions(**kwargs) Retrieve list of DDMEndpoint permissions.
list_ddmendpoints_quotas(**kwargs) Retrieve quota information for ddmendpoint.
list_ddmendpoints_seinfo(**kwargs) Get list of DDMEndpointSEInfo objects by given criteria.
list_ddmendpoints_tokens(**kwargs) Get list of StorageArea token values grouped by requested parameter groupby.
list_ddmgroups(**kwargs) Retrieve DDMGroups with DDMEndpoints associated.
list_ddmgroups_names(**kwargs) Retrieve list of DDMGroup names.
list_downtimes(**kwargs) Retrieve list of site downtimes by given criteria.
list_frontier_services(**kwargs) Retrieve Frontier Services of a site.
list_fsconfigurations(**kwargs) Get list of frontier squid configuration by id or given site if any.
list_lfc_services(**kwargs) List LFC Services that serve given identifier.
list_panda_queues(**kwargs) Returns list of Panda Queue object data, do resolve PandaQueue by Panda, ATLAS, DDM, RC site names.
list_panda_resources(**kwargs) Returns list of Panda Resource object data, do resolve PandaResource by Panda, ATLAS, DDM, RC site names.
list_panda_sites(**kwargs) Returns list of Panda sites data, do resolve PandaSite by ATLAS, DDM, RC site names.
list_panda_swreleases(**kwargs) Returns list of SWRelease objects associated with PandaResource by given criteria.
list_permission_types(**kwargs) Return list of the permission types.
list_permissions(**kwargs) Backward compatibility function, alias for list_ddmendpoints_permissions function.
list_physics_groups(**kwargs) Retrieve list of Physics Group names.
list_presource_types(**kwargs) Return list of possible PandaQueue types.
list_queues(**kwargs) Retrieve list of queue objects by given criteria.
list_rc_data(**kwargs) Retrieve RC related data by given query.
list_regional_centers(**kwargs) Retrieve list of RegionalCenters objects with additional extra_fields requested.
list_rolenames(**kwargs) Retrieve list of role names (FQANs).
list_service_node_monitors(**kwargs) Get list of service nodes monitors.
list_service_nodes(**kwargs) Get list of service nodes filter by service if need.
list_services(**kwargs) List site services.
list_shares(**kwargs) Get list of DDM shares.
list_sites(**kwargs) Returns list of ATLAS sites data.
list_sites_ddmendpointnames(**kwargs) List DDMEndpoint names associated with site by given site, cloud, tier_level, ddmendpoint, rc.
list_sites_ddmendpoints(**kwargs) List DDMEndpoint names associated with site by given site, cloud, tier_level, ddmendpoint, rc.
list_sites_ddmnames(**kwargs) Return list of DDM site names, wrapper to list_sites function.
list_sites_names(**kwargs) Retrieve list of ATLAS sites names by given criteria, do resolve ATLAS site by pandasite, ddmendpoint, ddmsite.
list_sites_pandanames(**kwargs) List PANDA site names (PandaResources) by given criteria.
list_sites_status(**kwargs) Retrieve status for sites by given criteria.
list_squid_services(**kwargs) Retrieve Squid Services of a Site.
list_storage_elements(**kwargs) Get Storage Elements of a site (deprecated).
list_subscription_policies(**kwargs) Get list of site’s subscription policies.
list_swreleases(**kwargs) Returns list of SWRelease objects by given criteria.
list_tier_levels(**kwargs) Return list of all possible tier level values.
remove_frontier_service(**kwargs) Remove Frontier service identified by id or endpoint.
remove_fsconfiguration(**kwargs) Remove frontier squid configuration by given id or site_id or site_name.
remove_panda_swrelease(**kwargs) Remove associated SWRelease from PandaResource object.
remove_panda_swreleases(**kwargs) Bulk operation to remove associated SWReleases from PandaResource object.
remove_service_node(**kwargs) Remove ServiceNode object.
remove_service_node_monitor(**kwargs) Remove ServiceNodeMonitor object associated with service node by given id or node.
remove_squid_service(**kwargs) Remove Squid service identified by id or endpoint.
remove_swrelease(**kwargs) Remove SWRelease object from DB.
set_ddmendpoint_info(**kwargs) Update site object attributes for requested ddmendpoint.
set_frontier_service(**kwargs) Set Frontier service-related information.
set_fsconfiguration(**kwargs) Add of update fs configuration entry associated with site identified by site_id or site_name.
set_panda_resource(**kwargs) Update PandaResource object info by given id.
set_service(**kwargs) Set service-related information.
set_service_node(**kwargs) Set ServiceNode object for the Service.
set_site_info(**kwargs) Update site object attributes for requested site.
set_site_status(**kwargs) Set status for ATLAS site and given activity.
set_squid_service(**kwargs) Set Squid service-related information.
set_swrelease(**kwargs) Update SWRelease object info by given id.
add_frontier_service(**kwargs)

Add Frontier service associated with given site identified by site_id or site_name.

Parameters:
  • site_id – site id
  • site_name – site name, ignored if site_id passed

Service Info:

Parameters:
  • endpoint – service endpoint (required)
  • name – service name,
  • is_backup – boolean
  • stype – char, additional service sub type, ‘L’=for load balanced services, ‘R’=roundrobin aliased services
Returns:

id of just created service

Raises :

AGISException raised if any errors occurred

add_panda_swrelease(**kwargs)

Associate SWRelease object with PandaResource.

Parameters:
  • panda_resource_id – id number of PandaResource object to which SWRelease should be added
  • panda_resource – name of PandaResource object to which SWRelease should be added, ignored if panda_resource_id passed
  • id – id of SWRelease object to be associated
  • release – release value
  • project – project value
  • cmtconfig – cmtconfig value
  • major_release – major_release value
  • tag – filter by tag value
  • force_create – Boolean, do create SWRelease object by given release, project, cmtconfig, major_release, tag values if swrelease_id not passed or swrelease object not found in DB. By default, force_create=False.
Returns:

None

Raises :

AGISException raised if any errors occurred

add_service_node(**kwargs)

Add new ServiceNode to the Service.

Parameters:
  • service_id – service id for which to attach node
  • service_endpoint – service endpoint for which to set node, ignored if serice_id given
  • endpoint – node endpoint

Monitoring info should be specified if node need to be monitored:

Parameters:
  • mhost – host used for monitoring
  • mport – port used for monitoring
Returns:

True if data have been updated in DB. False if data don’t need to be updated

Raises :

AGISException raised if any errors occurred

add_squid_service(**kwargs)

Add Squid service (Frontier or CVMFS related one) associated with given site identified by site_id or site_name.

Parameters:
  • site_id – site id
  • site_name – site name, ignored if site_id passed

Service Info:

Parameters:
  • endpoint – service endpoint (required)
  • name – service name,
  • priority – priority integer value
  • is_backup – boolean
  • stype – char, additional service sub type, ‘L’=for load balanced services, ‘R’=roundrobin aliased services
  • typeServiceType.Squid (Frontier Squid) or ServiceType.SquidCVMFS (CVMFS Squid), by default type= ServiceType.Squid
Returns:

id of just created service

Raises :

AGISException raised if any errors occurred

add_swrelease(**kwargs)

Add SWRelease object into DB.

If object with given release, project, cmtconfig key values is already exist in DB, an exception will raised.

Parameters:
  • release – release value
  • project – project value
  • cmtconfig – cmtconfig value
  • major_release – major_release value
  • tag – filter by tag value
Returns:

id of just created object

Raises :

AGISException raised if any errors occurred

get_closesites(**kwargs)

Get close sites relations for given ddmendpoint.

Returned key values depend on groupby parameter that specifies the way of grouping: src, dst, fts.

Parameters:
  • src – filter by source DDMEndpoint
  • dst – filter by destination DDMEndpoint
  • factor – filter by factor value, integer type
  • factor_gte – filter by factor value, factor>= factor_gte, ignored if factor parameter given
  • factor_lte – filter by factor value, factor<= factor_lte, ignored if factor parameter given
  • groupby – the parameter specified for what data key apply grouping, possible values=’src’, ‘dst’, ‘fts’
Raises :

AGISException raised if any errors occurred

Returns:

dict(groupby, data)

get_closesites_names(**kwargs)

Get close sites names by given criteria.

Similar to agis.api.AGIS.AGIS.get_closesites function but returns only names values.

Returned key values depend on groupby parameter that specifies the way of grouping: src, dst, fts.

Parameters:
  • src – filter by source DDMEndpoint
  • dst – filter by destination DDMEndpoint
  • factor – filter by factor value, integer type
  • factor_gte – filter by factor value, factor>= factor_gte, ignored if factor parameter given
  • factor_lte – filter by factor value, factor<= factor_lte, ignored if factor parameter given
  • groupby – the parameter specified for what data key apply grouping, possible values=’src’, ‘dst’, ‘fts’, default=’src’
Raises :

AGISException raised if any errors occurred

Returns:

if groupby=src => return dict(‘src’: [set of dst DDMEndpoints]) if groupby=dst => return dict(‘dst’: [set of src DDMEndpoints]) if groupby=fts => return dict(‘fts’: [set of src DDMEndpoints])

get_seinfo_entry(**kwargs)

Get seinfo entry by given site name (special function for dq2.info compatibility).

Warning

This function implemented for backward compatibility with dq2.info, should be deprecated and will be reimplemented (removed) in next releases.

Parameters:ddmendpoint – filter by DDMEndpoint name
Returns:dict(‘DDMEndpoint’: {seinfo})
Raises :AGISException raised if any errors occurred or or ddmendpoint name is invalid (NotExistsException)
get_site_status(**kwargs)

Retrieve status for sites by given criteria.

If activity parameter is given, then services (SRM) which are directly associated with ATLAS site taken into account while calculating site status.

Returned key values depend on groupby parameter that specifies the way of grouping: by site, by ddmsite.

Parameters:
  • cloud – filter by cloud name or list of names
  • site – filter by ATLAS site name
  • ddmsite – filter by DDMSite name, ignored if site param given
  • activity – activity type for which status is requested
  • status – filter by status values, e.g. SiteStatusTypes.DOWN, agis.objects.site.SiteStatusTypes object describes all possible values
  • groupby – the parameter specified for what data key do apply grouping, possible values: site, ddmsite, by default, groupby=site (ATLAS site name)
Returns:

dict(groupby: SiteStatus object}

Raises :

AGISException raised if any errors occurred

get_storage_element(**kwargs)

Get info about StorageElement (deprecated).

Warning

This function is deprecated and will be reimplemented (removed) in the next releases.

Parameters:id – se id
Params depth:depth level specified how many levels of the relations should be extracted from db default depth=2 (site, system info included)
Returns:StorageElement object
Raises :AGISException raised if any errors occurred.
get_storage_info(**kwargs)

Get LFC endpoint and list of DDMEndpoints for given cloud and closeSE (dq2.info special function).

Parameters:
  • cloud – the name or alias of the cloud
  • fsrm – full srm path with base path included of closeSE
Returns:

tuple (LFC endpoint, [full srm endpoints]

This method returns the LFC that output files should be registered to and a list of storages to store output files in order of preference:

  • close SE if it is in the cloud
  • the cloud’s T1 disk SE
  • other SEs in the cloud
Raises :AGISException raised if any errors occurred.
list_activity_types(**kwargs)

Get ADC activity types.

Parameters:
  • id – filter by internal index id of activity type object
  • iname – filter by case insensitive name of activity
  • activity – filter by ActivityType name or list of names, ignored if iname param passed
Returns:

list of ActivityType objects

Raises :

AGISException raised if any errors occurred

list_ce_services(**kwargs)

Retrieve list of CEs associated with site.

Parameters:
  • type – filter by service type if given. Use values from ServiceType object
  • cloud – filter by cloud name or list of names
  • site – filter by site name or list of names, if given, cloud parameter is ignored.
  • id – filter by service_id, if given all other params ignored
Returns:

list of ComputingElement objects

Raises :

AGISException raised if any errors occurred

list_clouds(**kwargs)

Retrieve list of cloud objects.

Parameters:
  • cloud – filter by cloud name
  • ddmendpoint – resolve cloud by given DDMEndpoint
Returns:

list of Cloud objects

Raises :

AGISException raised if any errors occurred.

list_clouds_names(**kwargs)

Retrieve list of cloud names.

Parameters:type – type of name, possible values: name (2-letter name), alias (fullname), by default return 2-letter names
Returns:list of cloud names
Raises :AGISException raised if any errors occurred.
list_ddmactivity_types(**kwargs)

Get DDM transfer activity types.

Parameters:
  • id – filter by internal index id of activity type object (serial)
  • activity_id – filter by id of activity
  • iname – filter by case insensitive name of activity
  • activity – filter by ActivityType name or list of names, ignored if iname param passed
Returns:

list of ActivityType objects

Raises :

AGISException raised if any errors occurred

list_ddmendpointnames_by_surl(**kwargs)

List of DDMEndpoint names by given surl (matched against se domain pattern).

Parameters:
  • surl – source url
  • ddmendpoint – ddmendpoint name, if given name param is ignored,
  • name – name of site, regional center, cloud or ddmgroup, NonExistsException exception raised if name not found
Returns:

list of DDMEndpoints names

Raises NonExistsException:
 

NonExistsException exception raised if ddmendpoint is not exist

Raises :

AGISException raised if any errors occurred

list_ddmendpoints_permissions(**kwargs)

Retrieve list of DDMEndpoint permissions.

Parameters:
  • ddmendpoint – filter by DDMEndpoint name
  • permission – filter by permission key from PermissionTypes objects (e.g. PermissionTypes.R, PermissionTypes.W, ect)
Returns:

dict(‘ddmendpoint’:[{‘role’:’lowcasename’, ‘permissions’:’perms’}])

Raises :

AGISException raised if any errors occurred.

list_ddmendpoints_quotas(**kwargs)

Retrieve quota information for ddmendpoint.

Parameters:
  • ddmendpoint – filter by ddmendpoint
  • role – filter by role name of quotas
Returns:

dict(‘DDMEndpoint’:[{‘role’:’‘, ‘quota’:’‘, ‘role_id’:’‘}, ..])

Raises :

AGISException raised if any errors occurred or ddmendpoint name is invalid (NotExistsException)

list_ddmendpoints_seinfo(**kwargs)

Get list of DDMEndpointSEInfo objects by given criteria.

Wrapped method to list_sites_ddmendpoints function.

Allowed input filters and groupby parameter described in agis.api.AGIS.AGIS.list_sites_ddmendpoints function.

Parameters:groupby – possible values: ‘ddmendpoint’, ‘ddmsite’, ‘site’, ‘token’, ‘cloud’; default = ‘ddmendpoint’
Returns:dict {groupby:[‘DDMEndpointSEInfo’]}
list_ddmendpoints_tokens(**kwargs)

Get list of StorageArea token values grouped by requested parameter groupby.

Wrapped method to list_sites_ddmendpoints function returned only the list of ddmendpoint tokens groupped by groupby parameter.

Allowed input filters and groupby parameter described in agis.api.AGIS.AGIS.list_sites_ddmendpoints function.

Parameters:groupby – default value=’rc_site’
Returns:dict with list of DDMEndpoints names: {groupby:{[DDMEndpoint name]}
list_ddmgroups(**kwargs)

Retrieve DDMGroups with DDMEndpoints associated.

Parameters:
  • name – filter by ddmgroup name
  • groupby – group by ddmgroup name (‘ddmgroup’ value) or by ddmendpoint name (‘ddmendpoint’ value), by default, groupby=’ddmgroup’
Returns:

if groupby=’ddmgroup’ returns dict(‘ddmgroup_name’:[DDMEndpoints])

if groupby=’ddmendpoint’ returns dict(‘ddmendpoint_name’:[DDMGroups])

Raises :

AGISException raised if any errors occurred.

list_ddmgroups_names(**kwargs)

Retrieve list of DDMGroup names.

Parameters:name – filter by ddmgroup name
Returns:list of DDMGroup names
Raises :AGISException raised if any errors occurred.
list_downtimes(**kwargs)

Retrieve list of site downtimes by given criteria.

Returned key values depend on groupby parameter that specifies the way of grouping: by site, by rc_site, by ddmsite.

Parameters:
  • cloud – filter by cloud name or list of names
  • site – filter by ATLAS site name
  • rc_site – filter by (GOCDB/OIM) site name
  • ddmsite – filter by DDMSite name
  • tier_level – filter by tier level value associated with ATLASSite
  • rc_tier_level – filter by tier level value associated with related RegionalCenter
  • severity – filter by case-insensitive severity value
  • groupby – the parameter specified for what data key apply grouping, possible values: site, rc_site, ddmsite, by default, groupby = site (ATLAS site name)
  • bstart_time – datetime object or string in format “YYYY-MM-DD [HH:MM:ss]”, get downtimes with the beginning time not earlier than start_time
  • bend_time – datetime object or string in format “YYYY-MM-DD [HH:MM:ss]”, get downtimes with the beginning time not later than end_time
  • ongoing_time – filter by downtimes valid on given ongoing time
  • start_time – the same as bstart_time, for backward compatibility
  • end_time – the same as bend_time, for backward compatibility
  • filter – filter by time using predefined filters on server side, if given all other passed time parameters (except of ongoing_time) are ignored, possible values=[‘henceforward’]. henceforward value: returns ongoing plus future downtimes.
  • state – filter by object state values (by default, show ACTIVE only objects), use state= ObjectStateTypes.ANY value to show objects with any states, e.g. ObjectStateTypes.ACTIVE, ObjectStateTypes.DISABLED
Returns:

dict(groupby:[Downtime objects])

Raises :

AGISException raised if any errors occurred

list_frontier_services(**kwargs)

Retrieve Frontier Services of a site.

Parameters:
  • type – filter by service type if given. Use values from ServiceType object
  • cloud – filter by cloud name or list of names
  • site – filter by site name or list of names, if given, cloud parameter is ignored.
  • id – filter by service_id, if given all other params ignored
Returns:

list of FrontierService objects

Raises :

AGISException raised if any errors occurred

list_fsconfigurations(**kwargs)

Get list of frontier squid configuration by id or given site if any.

Parameters:
  • id – configuration id to be retrieved,
  • site_id – filter by site, ignored if conf id passed,
  • site_name – filter by site name, ignored if site_id passed
Returns:

dict, {‘site_name’:FSConfiguration object}

Raises :

AGISException raised if any errors occurred

list_lfc_services(**kwargs)

List LFC Services that serve given identifier.

returns DDMEndpoint.servedlfc if defined otherwise one associated with cloud.

Parameters:
  • ddmendpoint – filter by ddmendpoint, resolve special association with ddmendpoint first, then resolve from cloud
  • cloud – filter by services associated with cloud, ignored if ddmendpoint passed
  • ddmgroup – filter by ddmendpoints belonging to given ddmgroup, ignored if ddmendpoint or cloud passed
Returns:

list of Service Objects

Raises :

AGISException raised if any errors occurred or ddmendpoint is invalid (NotExistsException)

list_panda_queues(**kwargs)

Returns list of Panda Queue object data, do resolve PandaQueue by Panda, ATLAS, DDM, RC site names.

Possible filter parameters:

Parameters:
  • cloud – filter by cloud or list of cloud names
  • id – filter by object id
  • panda_site – filter by Panda site name
  • atlas_name – filter by ATLAS site name
  • site – ATLAS site name: alias to atlas_name parameter
  • rc_site – filter by RegCenter site name
  • rc_site_id – filter by id of RegCenter site
  • rc – filter by regional center name
  • country – filter by Country name associated with Site
  • rc_country – filter by Country name asssociated with RC
  • ddm_name – filter by DDMSite name
  • ddmsite – alias to ddm_name parameter
  • ddmendpoint – filter by sites with DDMEndpoint name specified
  • panda_site – filter by PandaSite name
  • panda_resource – filter by PandaResource name (PandaSiteID)
  • name – filter by PandaQueue name, alias to panda_queue
  • panda_queue – filter by PandaQueue name
  • ce_name – filter by CE name of associated CE object
  • ce_endpoint – filter by endpoint value of associated CE object
  • ce_queue_name – filter by CE local queue name
  • is_cvmfs – filter by PandaResource CVMFS status, boolean
  • is_atlas – filter by ATLASSite is_atlas field, boolean
  • related filters (CE) – possible parameters to filter by CE related data: [‘ce_endpoint’, ‘ce_flavour’, ‘ce_id’, ‘ce_jobmanager’, ‘ce_name’, ‘ce_queue_id’, ‘ce_queue_maxcputime’, ‘ce_queue_maxwctime’, ‘ce_queue_name’, ‘ce_queue_status’, ‘ce_state’, ‘ce_version’]
  • type – alias to prtype
  • prtype – filter by type of associated PandaQueue, use agis.objects.presource.PRType values: PRType.PRODUCTION, PRType.ANALYSIS
  • is_pledged – boolean, if True returns only pledged ATLAS sites
  • tier_level – filter by tier level value associated with ATLASSite
  • rc_tier_level – filter by tier level value associated with related RegionalCenter
  • site_state – filter by ATLAS site state or list of state values (by default, show ACTIVE only sites), use state= ObjectStateTypes.ANY value to show sites with any states, e.g. ObjectStateTypes.ACTIVE, ObjectStateTypes.DISABLED
  • rc_site_state – filter by Site state or list of state values (by default, show ACTIVE only sites), use state= ObjectStateTypes.ANY value to show sites with any states, e.g. ObjectStateTypes.ACTIVE, ObjectStateTypes.DISABLED
  • groupby – possible values: panda_site, site (ATLAS site), rc_site, ddmsite, cloud, tier_level, rc, country, ce_endpoint, ce_name, type (PRType), prtype by default, groupby=’panda_site’ (Panda Site name)
  • extra_fields

    list of extra fields to be retrieved, possible values=[‘panda_resource’, ‘panda_site’, ‘site’ (‘atlas_site’), ‘cloud’, ‘tier_level’, ‘rc_tier_level’, ‘rc’, ‘grid_flavour’, ‘country’, ‘rc_country’, ‘is_pledged’, ‘state’, ‘rc_site’, ‘ddm_name’(‘ddmsite’), ‘timezone’, ‘longitude’, ‘latitude’,

    ‘ceinfo’, ‘is_direct’, ‘is_analysis’, ‘is_production’, ‘is_atlas’, ‘queues’]

Optimization params:

Parameters:
  • efields – List of object fields to be excluded from processing
  • ofields – List of object fields to be ONLY included
Returns:

dict(groupby: list of PandaQueue objects)

Raises :

AGISException raised if any errors occurred

list_panda_resources(**kwargs)

Returns list of Panda Resource object data, do resolve PandaResource by Panda, ATLAS, DDM, RC site names.

Possible filter parameters:

Parameters:
  • cloud – filter by cloud or list of cloud names
  • id – filter by Panda site id
  • panda_site – filter by Panda site name
  • panda_site_id – filter by id number of Panda site object, alias to id parameter
  • atlas_name – filter by ATLAS site name
  • site – ATLAS site name: alias to atlas_name parameter
  • rc_site – filter by RegCenter site name
  • rc_site_id – filter by id of RegCenter site
  • rc – filter by regional center name
  • country – filter by Country name associated with Site
  • rc_country – filter by Country name asssociated with RC
  • ddm_name – filter by DDMSite name
  • ddmsite – alias to ddm_name parameter
  • ddmendpoint – filter by sites with DDMEndpoint name specified
  • panda_resource – filter by PandaResource name (PandaSiteID)
  • panda_queue – filter by associated PandaQueue name
  • prtype – filter by type of associated PandaQueue, use agis.objects.presource.PRType values: PRType.PRODUCTION, PRType.ANALYSIS
  • is_pledged – boolean, if True returns only pledged ATLAS sites
  • is_atlas – filter by ATLASSite is_atlas field, boolean
  • tier_level – filter by tier level value associated with ATLASSite
  • rc_tier_level – filter by tier level value associated with related RegionalCenter
  • state – filter by ATLAS site state or list of state values (by default, show ACTIVE only sites), use state= ObjectStateTypes.ANY value to show sites with any states, e.g. ObjectStateTypes.ACTIVE, ObjectStateTypes.DISABLED
  • groupby – possible values: panda_site, site (ATLAS site), rc_site, ddmsite, cloud, tier_level, rc, country by default, groupby=’site’ (ATLAS site name)
  • extra_fields – list of extra fields to be retrieved, possible values=[‘panda_site’, ‘site’, ‘cloud’, ‘tier_level’, ‘rc_tier_level’, ‘rc’, ‘grid_flavour’, ‘country’, ‘rc_country’, ‘is_pledged’, ‘state’, ‘atlas_site’, ‘rc_site’, ‘ddm_name’(‘ddmsite’), ‘timezone’, ‘longitude’, ‘latitude’]

Optimization params:

Parameters:
  • efields – List of object fields to be excluded from processing
  • ofields – List of object fields to be ONLY included
Returns:

dict(groupby: list of Site objects)

Raises :

AGISException raised if any errors occurred

list_panda_sites(**kwargs)

Returns list of Panda sites data, do resolve PandaSite by ATLAS, DDM, RC site names.

Possible filter parameters:

Parameters:
  • cloud – filter by cloud or list of cloud names
  • id – filter by Panda site id
  • panda_site – filter by Panda site name
  • panda_site_id – filter by id number of Panda site object, alias to id parameter
  • atlas_name – filter by ATLAS site name
  • site – ATLAS site name: alias to atlas_name parameter
  • rc_site – filter by RegCenter site name
  • rc_site_id – filter by id of RegCenter site
  • rc – filter by regional center name
  • country – filter by Country name associated with Site
  • rc_country – filter by Country name asssociated with RC
  • ddm_name – filter by DDMSite name
  • ddmsite – alias to ddm_name parameter
  • ddmendpoint – filter by sites with DDMEndpoint name specified
  • panda_site – filter by PandaSite name
  • panda_resource – filter by PandaResource name (PandaSiteID)
  • panda_queue – filter by associated PandaQueue name
  • prtype – filter by type of associated PandaQueue, use agis.objects.presource.PRType values: PRType.PRODUCTION, PRType.ANALYSIS
  • is_pledged – boolean, if True returns only pledged ATLAS sites
  • is_atlas – filter by ATLASSite is_atlas field, boolean
  • tier_level – filter by tier level value associated with ATLASSite
  • rc_tier_level – filter by tier level value associated with related RegionalCenter
  • state – filter by ATLAS site state or list of state values (by default, show ACTIVE only sites), use state= ObjectStateTypes.ANY value to show sites with any states, e.g. ObjectStateTypes.ACTIVE, ObjectStateTypes.DISABLED
  • groupby – possible values: panda_site, site (ATLAS site), rc_site, ddmsite, cloud, tier_level, rc, country by default, groupby=’site’ (ATLAS site name)
  • extra_fields – list of extra fields to be retrieved, possible values=[‘site’, ‘cloud’, ‘tier_level’, ‘rc_tier_level’, ‘rc’, ‘grid_flavour’, ‘country’, ‘rc_country’, ‘is_pledged’, ‘state’, ‘atlas_site’, ‘rc_site’, ‘ddm_name’, ‘timezone’, ‘longitude’, ‘latitude’]

Optimization params:

Parameters:
  • efields – List of object fields to be excluded from processing
  • ofields – List of object fields to be ONLY included
Returns:

dict(groupby: list of Site objects)

Raises :

AGISException raised if any errors occurred

list_panda_swreleases(**kwargs)

Returns list of SWRelease objects associated with PandaResource by given criteria.

Possible filter parameters:

Parameters:
  • id – filter by swrelease object id
  • release – filter by release value
  • project – filter by project value
  • cmtconfig – filter by cmt value
  • major_release – filter by major release value
  • tag – filter by tag value
  • rc_site – filter by RegCenter site name
  • site – filter by regional center name
  • panda_site – filter by PandaSite name
  • panda_resource – filter by PandaResource name (PandaSiteID)
  • panda_resource_id – filter by PandaResource object id
  • panda_queue – filter by associated PandaQueue name
  • cloud – filter by cloud or list of cloud names
  • groupby – possible values: [‘swrelease_id’, ‘release’, ‘project’, ‘cmtconfig’, ‘major_release’, ‘tag’, ‘panda_site’, ‘panda_resource’], by default, groupby=’panda_resource’

Returned key values depend on groupby parameter that specifies the way of grouping: src, dst, fts.

Parameters:extra_fields – list of extra fields to be retrieved, possible values=[‘swrelease_id’, ‘release’, ‘project’, ‘cmtconfig’, ‘major_release’, ‘tag’, ‘panda_site’, ‘panda_resource’]

Optimization params:

Parameters:
  • efields – List of object fields to be excluded from processing
  • ofields – List of object fields to be ONLY included
Returns:

dict(groupby: list of agis.objects.SWRelease objects)

Raises :

AGISException raised if any errors occurred

list_permission_types(**kwargs)

Return list of the permission types. Example of permission type keys: ‘r’, ‘w’, .. :raises: AGISException raised if any errors occurred

list_permissions(**kwargs)

Backward compatibility function, alias for list_ddmendpoints_permissions function.

Note

This function is deprecated, use agis.api.AGIS.AGIS.list_ddmendpoints_permissions instead.

list_physics_groups(**kwargs)

Retrieve list of Physics Group names. :return: list of physics groups names :raises: AGISException raised if any errors occurred.

list_presource_types(**kwargs)

Return list of possible PandaQueue types.

Parameters:dbonly – if True, return only PRTypes exist in DB
Returns:list of types
list_queues(**kwargs)

Retrieve list of queue objects by given criteria.

Find queues by site, CE or identified by queue id, name.

Parameters:
  • id – filter by queue id
  • name – queue name, ignored if id passed
  • ce_id – id of ComputingElement
  • site_id – filter by associated site id
  • site_name – filter by associated site name, ignored if site_id passed
Returns:

list of Queue objects

Raises :

AGISException raised if any errors occurred

list_rc_data(**kwargs)

Retrieve RC related data by given query.

Parameters:
  • name – regional center name
  • site – resolve RC by ATLAS site name if given
  • ddmendpoint – resolve RC by DDMEndpoint
  • cloud – filter by cloud
  • is_pledged – boolean, if True returns only Reg centers with pledges defined
  • fields – extracted fields data: pledges, sites, by default all possible fields retrieved
Returns:

list of RegCenterData objects

Raises :

AGISException raised if any errors occurred

list_regional_centers(**kwargs)

Retrieve list of RegionalCenters objects with additional extra_fields requested.

Returned key values depend on groupby parameter that specifies the way of grouping.

Parameters:
  • name – filter by rc name
  • site – resolve RC by ATLAS site name or list of names
  • ddmendpoint – resolve RC by DDMEndpoint
  • cloud – filter by cloud name of list of names
  • country – filter by country name of list of names
  • tier_level – filter by tier_level value
  • is_pledged – boolean, if True returns only Reg Centers with pledges defined
  • extra_fields – list of extra fields to be retrieved, possible values=[‘cloud’, ‘country’, ‘pledges’, ‘sites’]
  • groupby – the parameter specified for what data key apply grouping, possible values: cloud, country, rc (rc name), tier_level, id (RegCenter object id itself) by default, groupby=cloud

Optimization params (optional):

Parameters:
  • efields – List of object fields to be excluded from db processing
  • ofields – List of object fields to be ONLY included
Returns:

dict(groupby:list of RegionalCenter objects)

Raises :

AGISException raised if any errors occurred

list_rolenames(**kwargs)

Retrieve list of role names (FQANs).

Parameters:
  • id – filter by role id
  • name – filter by role name
Returns:

list of role names

Raises :

AGISException raised if any errors occurred.

list_service_node_monitors(**kwargs)

Get list of service nodes monitors. Do filter by service or service node if need.

Parameters:
  • service_id – service id
  • service_endpoint – service endpoint, ignored if service_id given
  • node_id – service node id,
  • node_endpoint – service node endpoint, ignored if node_id given,

Service input info ignored if node info passed.

Returns:list of ServiceNodeMonitor objects
Raises :AGISException raised if any errors occurred
list_service_nodes(**kwargs)

Get list of service nodes filter by service if need.

Parameters:
  • id – node id,
  • service_id – service id, ignored if node id given
  • service_endpoint – service endpoint, ignored if service_id given
Returns:

dict, {‘service_id’: list of ServiceNode objects}

Raises :

AGISException raised if any errors occurred

list_services(**kwargs)

List site services.

Parameters:
  • type – filter by service type if given. Use values from ServiceType object
  • cloud – filter by cloud name or list of names
  • site – filter by site name or list of names
Returns:

dict, {‘site_name’: agis.objects.Service object }.

Raises :

AGISException raised if any errors occurred.

list_shares(**kwargs)

Get list of DDM shares.

Parameters:
  • id – filter by share id
  • name – filter by share name or list of names
Returns:

list of share objects

Raises :

AGISException raised if any errors occurred

list_sites(**kwargs)

Returns list of ATLAS sites data.

Possible filter parameters:

Parameters:
  • cloud – filter by cloud or list of cloud names
  • id – filter by ATLAS site id
  • site_id – alias to id parameter
  • atlas_name – filter by ATLAS site name
  • site – alias to atlas_name parameter
  • rc_site – filter by RegCenter site name
  • rc_site_id – filter by id of RegCenter site
  • rc – filter by regional center name
  • country – filter by Country name associated with Site
  • rc_country – filter by Country name asssociated with RC
  • ddm_name – filter by DDMSite name
  • ddmsite – alias to ddm_name parameter
  • ddmendpoint – filter by sites with DDMEndpoint name specified
  • panda_site – filter by PandaSite name
  • panda_resource – filter by PandaResource name (PandaSiteID)
  • panda_queue – filter by associated PandaQueue name
  • is_pledged – boolean, if True returns only pledged ATLAS sites
  • is_atlas – filter by ATLASSite is_atlas field, boolean
  • tier_level – filter by tier level value associated with ATLASSite
  • rc_tier_level – filter by tier level value associated with related RegionalCenter
  • state – filter by site state or list of state values (by default, show ACTIVE only sites), use state= ObjectStateTypes.ANY value to show sites with any states, e.g. ObjectStateTypes.ACTIVE, ObjectStateTypes.DISABLED
  • rc_site_state – filter by RC Site state or list of state values (by default, show ACTIVE only objects), use state= ObjectStateTypes.ANY value to show objects with any states, e.g. ObjectStateTypes.ACTIVE, ObjectStateTypes.DISABLED
  • groupby – possible values: rc_site, ddmsite, site, cloud, id (site id), tier_level, rc, country by default, groupby=’cloud’
  • extra_fields – list of extra fields to be retrieved, possible values=[‘cloud’, ‘tier_level’, ‘rc_tier_level’, ‘rc’, ‘grid_flavour’, ‘country’, ‘rc_country’, ‘is_pledged’, ‘emailContact’, ‘infoURL’, ‘rc_site’, ‘timezone’, ‘longitude’, ‘latitude’, ‘presources’]

Optimization params:

Parameters:
  • efields – List of object fields to be excluded from processing
  • ofields – List of object fields to be ONLY included
Returns:

dict(groupby: list of Site objects)

Raises :

AGISException raised if any errors occurred

list_sites_ddmendpointnames(**kwargs)

List DDMEndpoint names associated with site by given site, cloud, tier_level, ddmendpoint, rc.

Returned key values depend on groupby parameter that specifies the way of grouping: by [site, ddmsite, regional center, tier_level, id]

Wrapped method to list_sites_ddmendpoints function returned only the list of ddmendpoint names groupped by groupby parameter.

Allowed input filters and groupby parameter described in agis.api.AGIS.AGIS.list_sites_ddmendpoints function.

Parameters:groupby – default value=’rc_site’
Returns:dict with list of DDMEndpoints names: {groupby:{[DDMEndpoint name]}
list_sites_ddmendpoints(**kwargs)

List DDMEndpoint names associated with site by given site, cloud, tier_level, ddmendpoint, rc.

Returned key values depend on groupby parameter that specifies the way of grouping: by [site, ddmsite, regional center, tier_level, id]

Parameters:
  • id – ddmendpoint object identifier
  • cloud – filter by cloud or list of cloud names
  • site_id – ATLASSite object identifier
  • site – filter by ATLAS site name
  • rc_site – filter by RegCenter site name
  • rc_site_id – filter by id of RegCenter site
  • rc – filter by regional center name
  • country – filter by Country name associated with Site
  • rc_country – filter by Country name asssociated with RC
  • ddmsite – filter by DDMSite name
  • ddmendpoint – filter by DDMEndpoint name specified
  • panda_site – filter by PandaSite name
  • panda_resource – filter by PandaResource name (PandaSiteID)
  • panda_queue – filter by associated to ATLAS site PandaQueue name
  • is_pledged_site – boolean, if True returns only pledged ATLAS sites
  • is_pledged – boolean, if True returns only DDMEdnpoints with is_pledged attribute equals to True
  • tier_level – filter by tier level value associated with ATLASSite
  • rc_tier_level – filter by tier level value associated with related RegionalCenter
  • srm – retrieve only ddmendpoints related to StorageElement indentified by srm endpoint
  • servedlfc – retrieve only ddmendpoints served by given LFC endpoint (associated through DDMEndpoint.servedlfc or Cloud.servedlfc relations)
  • ddmgroup – filter by DDMGroup name
  • state – filter by state or list of state values (by default, show ACTIVE only objects), use state= ObjectStateTypes.ANY value to show objects with any states, e.g. ObjectStateTypes.ACTIVE, ObjectStateTypes.DISABLED
  • site_state – filter by ATLASSite state or list of state values (by default, show ACTIVE only objects), use state= ObjectStateTypes.ANY value to show sites with any states, e.g. ObjectStateTypes.ACTIVE, ObjectStateTypes.DISABLED
  • rc_site_state – filter by Site state or list of state values (by default, show ACTIVE only objects), use state= ObjectStateTypes.ANY value to show objects with any states, e.g. ObjectStateTypes.ACTIVE, ObjectStateTypes.DISABLED
  • groupby – the parameter specified for what data key apply grouping, possible values: site, ddmsite, cloud, rc, tier_level, srm, id (DDMEndpoint object id itself), ddmendpoint (DDMEndpoint name itself), servedlfc by default, groupby=rc_site (RC site name)
  • extra_fields – list of extra fields to be retrieved, possible values=[‘cloud’, ‘rc_tier_level’, ‘tier_level’, ‘country’, ‘srm’, ‘rc_country’, ‘lfc’, ‘servedlfc’, ‘token’]

Optimization params:

Parameters:
  • efields – List of object fields to be excluded from db processing
  • ofields – List of object fields to be ONLY included
Returns:

dict with list of DDMEndpoints associated with site: {groupby:{[DDMEndpoint object]}

list_sites_ddmnames(**kwargs)

Return list of DDM site names, wrapper to list_sites function.

Preserved for backward compatibility.

Wrapped method to list_sites function returned only list of ddmnames groupped by groupby parameter.

Allowed input filters and groupby parameter described in agis.api.AGIS.AGIS.list_sites function.

Parameters:groupby – default value=’rc_site’
Returns:dict with list of DDMSite names associated with site: {groupby:[DDMSite names]}
Raises :AGISException raised if any errors occurred
list_sites_names(**kwargs)

Retrieve list of ATLAS sites names by given criteria, do resolve ATLAS site by pandasite, ddmendpoint, ddmsite.

Similar to agis.api.AGIS.AGIS.list_sites function but returns the list of ATLAS Site names. Accepted input filters described in agis.api.AGIS.AGIS.list_sites function.

Returns:list of ATLAS site names
Raises :AGISException raised if any errors occurred
list_sites_pandanames(**kwargs)

List PANDA site names (PandaResources) by given criteria.

Preserved for backward compatibility, wrapper to list_panda_queues function.

see agis.api.AGIS.AGIS.list_panda_queues for details about accepted input parameters.

Returns:dict with list of PANDA Resorce names associated with ATLAS site: {‘site_name’:{‘queue_type’:[PandaResource name]}}
Raises :AGISException raised if any errors occurred
list_sites_status(**kwargs)

Retrieve status for sites by given criteria.

Note

The function returns only defined statuses for each activity.

Returned key values depend on groupby parameter that specifies the way of grouping: by site, by ddmsite, by id (site id).

Parameters:
  • activity – Activity type for which status is requested
  • cloud – filter by cloud name or list of names
  • site – filter by ATLAS site name
  • ddmsite – filter by DDMSite name, ignored if site parameter given
  • site_state – filter by site.state value, e.g. ObjectStateTypes.ACTIVE|DISABLE|ANY, by default shown only ACTIVE sites,
  • state – filter by state value ( e.g. AStateTypes.ON|OFF|AUTO),
  • autostate – filter by autostate value ( e.g. AStateValues.ON|OFF|AUTO),
  • status – filter by resulted status value or list of values, possible values to filter: AStateValues.ON|OFF|ANY if state=AStateTypes.ON|OFF => return status=AStateValues.ON|OFF value if state=AStateTypes.AUTO => return status=autostate value
  • groupby – the parameter specified for what data key do apply grouping, possible values: site, ddmsite, activity by default, groupby=site (ATLAS site name)
Returns:

dict(groupby:list of SiteStatusActivity objects)

Raises :

AGISException raised if any errors occurred.

list_squid_services(**kwargs)

Retrieve Squid Services of a Site.

Parameters:
  • type – filter by service type if given. Use values from ServiceType object
  • cloud – cloud name or list of names, filter by cloud.
  • site – site name or list of sites, filter by site, if given, cloud parameter is ignored.
  • id – filter by service_id, if given all other params ignored
Returns:

list of SquidService objects

Raises :

AGISException raised if any errors occurred

list_storage_elements(**kwargs)

Get Storage Elements of a site (deprecated).

Warning

This function is deprecated and will be reimplemented (removed) in the next releases.

Parameters:
  • cloud – Cloud name or list/tuple of Cloud names for which to get site storage elements.
  • site – Site name or list/tuple of Site names for which to get Storage Elements. If given, Cloud parameter is ignored. If neither Cloud nor Site parameter given, Storage Elements for all Sites are returned.
  • tier_level – Apply filtering by specified tier_level. Ignored if site value given.
  • regional_center – Apply filtering by specified regional center name. Ignored if site value given.
Params fse:

full storage element name in terms of SITENAME_TOKEN, if given site, cloud names are ignored

Optimization params:

Parameters:
  • efields – List of full hierarchy field (‘__’ delimited) to be excluded from db processing
  • ofields – List of full hierarchy field (‘__’ delimited) to be ONLY included

If optimization fields are applied return objects may be incomplete.

Returns:dictionary in form {“site_name”: [StorageElement_objects]}”.
Raises :AGISException raised if any errors occurred.
list_subscription_policies(**kwargs)

Get list of site’s subscription policies.

Note

This function could be removed from the next releases.

Parameters:
  • activity – activity name
  • cloud – cloud name
  • site – site name
  • data_type – DataType name
Returns:

list of SubscriptionPolicyResponse objects

list_swreleases(**kwargs)

Returns list of SWRelease objects by given criteria.

Possible filter parameters:

Parameters:
  • id – filter by object id
  • release – filter by release value
  • project – filter by project value
  • cmtconfig – filter by cmt value
  • major_release – filter by major release value
  • tag – filter by tag value
  • rc_site – filter by RegCenter site name
  • site – filter by regional center name
  • panda_site – filter by PandaSite name
  • panda_resource – filter by PandaResource name (PandaSiteID)
  • panda_queue – filter by associated PandaQueue name
  • cloud – filter by cloud or list of cloud names
  • groupby – possible values: [‘id’, ‘release’, ‘project’, ‘cmtconfig’, ‘major_release’, ‘tag’], by default, groupby=’release’

Returned key values depend on groupby parameter that specifies the way of grouping: src, dst, fts.

Optimization params:

Parameters:
  • efields – List of object fields to be excluded from processing
  • ofields – List of object fields to be ONLY included
Returns:

dict(groupby: list of agis.objects.SWRelease objects)

Raises :

AGISException raised if any errors occurred

list_tier_levels(**kwargs)

Return list of all possible tier level values.

Parameters:dbonly – if True, return only ones exist in DB
Returns:list of tier level values
remove_frontier_service(**kwargs)

Remove Frontier service identified by id or endpoint.

Any objects referenced to the service in DB will be also deleted recursively.

Parameters:
  • id – service id to be removed
  • endpoint – service endpoint to be removed
Returns:

True if objects to be deleted have been successfully deleted from DB, False if not found

Raises :

AGISException raised if any errors occurred

remove_fsconfiguration(**kwargs)

Remove frontier squid configuration by given id or site_id or site_name.

Parameters:
  • id – configuration id to be removed
  • site_id – associated site for configuration to be deleted, ignored if id passed
  • site_name – associated site_name for configuration to be deleted, ignored if site_id passed
Returns:

True on success, False if object not found in DB

Raises :

AGISException raised if any errors occurred

remove_panda_swrelease(**kwargs)

Remove associated SWRelease from PandaResource object.

SWRelease object identified by id or release, project, cmtconfig keys

Parameters:
  • id – SWRelease object id to be deattached from PandaResource
  • release – release value
  • project – project value
  • cmtconfig – cmtconfig value
  • panda_resource_id – id number of PandaResource object from which SWRelease should be removed
  • panda_resource – name of PandaResource object from which SWRelease should be removed, ignored if panda_resource_id passed
Returns:

False if given SWRelease object not found in DB

Raises :

AGISException raised if any errors occurred

remove_panda_swreleases(**kwargs)

Bulk operation to remove associated SWReleases from PandaResource object.

SWRelease objects are resolved by any of patterns for release, project, cmtconfig, tag keys Accepted filter patters:

Parameters:
  • release – regexp pattern of the release value
  • project – regexp pattern of the project value
  • cmtconfig – regexp pattern of the cmtconfig value
  • tag – regexp pattern of the tag value
  • irelease – case-insensitive regexp pattern of the release value
  • iproject – case-insensitive regexp pattern of the project value
  • icmtconfig – case-insensitive regexp pattern of the cmtconfig value
  • itag – case-insensitive regexp pattern of the tag value
  • panda_resource_id – id number of PandaResource object from which SWRelease should be removed
  • panda_resource – name of PandaResource object from which SWRelease should be removed, ignored if panda_resource_id passed
Returns:

The number of SWRelease objects being removed from PandaResource

remove_service_node(**kwargs)

Remove ServiceNode object.

Parameters:
  • id – node id to be removed
  • endpoint – node endpoint to be removed
Returns:

Boolean result of operation

Raises :

AGISException raised if any errors occurred

remove_service_node_monitor(**kwargs)

Remove ServiceNodeMonitor object associated with service node by given id or node.

Parameters:
  • id – monitor id to be removed
  • node_id – node id, ignored if id passed
  • node_endpoint – node endpoint, ignored if node_id passed
Returns:

True if objects to be deleted have been successfully deleted from DB, False if not found

Raises :

AGISException raised if any errors occurred

remove_squid_service(**kwargs)

Remove Squid service identified by id or endpoint.

Any objects referenced to the service in DB will be also deleted recursively.

Parameters:
  • id – service id to be removed
  • endpoint – service endpoint to be removed
Returns:

True if objects to be deleted have been successfully deleted from DB, False if not found

Raises :

AGISException raised if any errors occurred

remove_swrelease(**kwargs)

Remove SWRelease object from DB.

Do Remove SWRelease object from DB identified either by id or by composite [release, project, cmtconfig] key.

Any objects dependend on SWRelease in DB will be also deleted recursively.

Parameters:
  • id – object it to be removed
  • release – release value
  • project – project value
  • cmtconfig – cmtconfig value
Returns:

True if object to be deleted have been successfully deleted from DB, False if not found

Raises :

AGISException raised if any errors occurred

set_ddmendpoint_info(**kwargs)

Update site object attributes for requested ddmendpoint.

Parameters:
  • id – ddmendpoint id for which to set information
  • ddmendpoint – site name for which to set information, ignored if id given

Info to be updated:

Parameters:
  • name – do change the name value to new one,
  • state – state value to be set, possible values ObjectStateTypes.ACTIVE|DISABLED
  • state_comment – reason message of state value,
  • is_pledged – is pledged boolean value,
  • is_tape – is pledged boolean value to be set,
  • domain – domain value to be set
  • toolAssigner – toolAssigner value to be set
  • status – status value to be set
Returns:

False if object does not need to be updated, True if data’ve been updated in DB

Raises :

AGISException raised if any errors occurred

set_frontier_service(**kwargs)

Set Frontier service-related information.

Parameters:
  • id – service id for which to set information
  • endpoint – service endpoint for which to set information, ignored if service_id given

Info to be updated:

Parameters:
  • endpoint – service endpoint,
  • name – service name,
  • site_id – new id of site,
  • is_backup – boolean
  • stype – char, additional service sub type, ‘L’=for load balanced services, ‘R’=roundrobin aliased services
Returns:

False if object does not need to be updated, True if data’ve been updated in DB

Raises :

AGISException raised if any errors occurred

set_fsconfiguration(**kwargs)

Add of update fs configuration entry associated with site identified by site_id or site_name.

Parameters:
  • site_id – site id
  • site_name – associated site name, ignored if site_id passed

Info to be updated:

Parameters:
  • frontier_id – id of primary frontier service
  • frontier_endpoint – endpoint of primary frontier service
  • sbackup_sites – ordered list of associated backup sites for squids
  • fbackup_sites – ordered list of associated backup sites for frontiers
Returns:

id of just created/updated configuration object

Raises :

AGISException raised if any errors occurred

set_panda_resource(**kwargs)

Update PandaResource object info by given id.

Parameters:
  • id – id or name of object to be updated
  • force_create – Boolean, if object with given id not found in DB, do force create new one. By default, force_create=False.

Info to be updated:

Parameters:
  • name – PandaResource.name value to be set,
  • panda_site – associated panda_site value to be set,
  • is_cvmfs – cvmfs flag value to be set
Returns:

False if object does not need to be updated, True if data’ve been updated in DB

Raises :

AGISException raised if any errors occurred

set_service(**kwargs)

Set service-related information.

Parameters:
  • id – service id for which to set information
  • endpoint – service endpoint for which to set information, ignored if service_id given

Info to be updated:

Parameters:
  • endpoint – service endpoint,
  • name – service name,
  • type – service type,
  • site_id – new id of site
Returns:

False if object does not need to be updated, True if data’ve been updated in DB

Raises :

AGISException raised if any errors occurred

set_service_node(**kwargs)

Set ServiceNode object for the Service.

Parameters:
  • id – id of node to be updated
  • endpoint – new value for node endpoint

Monitoring info should be specified if node need to be monitored:

Parameters:
  • mhost – host used for monitoring
  • mport – port used for monitoring
Returns:

True if data have been updated in DB. False if data don’t need to be updated

Raises :

AGISException raised if any errors occurred

set_site_info(**kwargs)

Update site object attributes for requested site.

Parameters:
  • id – site id for which to set information
  • site – site name for which to set information, ignored if id given
  • do_create – Boolean paramter indicated if site object should be created if not exist by default do_create=False

Info to be updated:

Parameters:
  • name – do change site name to new value,
  • state – site state value to be set, possible values ObjectStateTypes.ACTIVE|DISABLED
  • state_comment – reason message of state value,
  • is_pledged – is pledged boolean value,
  • timezone – tz value,
  • longitude – geo coordinate value
  • latitude – geo coordinate value
  • infoURL – geo coordinate value
  • emailContact – geo coordinate value
  • rc – do change regional center to new one identified by given rc name
  • rc_id – do change regional center to new one identified by given rc id
Returns:

False if object does not need to be updated, True if data’ve been updated in DB

Raises :

AGISException raised if any errors occurred

set_site_status(**kwargs)

Set status for ATLAS site and given activity.

Parameters:
  • id – site id for which to set information
  • site – ATLAS site name for which to set information, ignored if id given
  • activity – activity name for which to set status

Info to be updated:

Parameters:
  • state – site state value to be set, possible values AStateTypes.ON|OFF|AUTO
  • state_comment – reason message of state value,
  • autostate – state value to be set, possible values AStateValues.ON|OFF
  • autostate_comment – reason message of autostate value
Returns:

False if object does not need to be updated, True if data’ve been updated in DB

Raises :

AGISException raised if any errors occurred

set_squid_service(**kwargs)

Set Squid service-related information.

Parameters:
  • id – service id for which to set information
  • endpoint – service endpoint for which to set information, ignored if service_id given

Info to be updated:

Parameters:
  • endpoint – service endpoint,
  • name – service name,
  • site_id – new id of site,
  • is_backup – boolean,
  • type – change type value if need: ServiceType.Squid (Frontier Squid) or ServiceType.SquidCVMFS (CVMFS Squid)
  • stype – char, additional service sub type, ‘L’=for load balanced services, ‘R’=roundrobin aliased services
  • priority – priority integer value
Returns:

False if object does not need to be updated, True if data’ve been updated in DB

Raises :

AGISException raised if any errors occurred

set_swrelease(**kwargs)

Update SWRelease object info by given id.

Parameters:id – object id to be updated

Info to be updated:

Parameters:
  • project – project value to be set,
  • release – release value to be set,
  • cmtconfig – cmtconfig value to be set,
  • major_release – major_release value to be set,
  • tag – filter by tag value
Returns:

False if object does not need to be updated, True if data’ve been updated in DB

Raises :

AGISException raised if any errors occurred