Alert.png The wiki is deprecated and due to be decommissioned by the end of September 2022.
The content is being migrated to other supports, new updates will be ignored and lost.
If needed you can get in touch with EGI SDIS team using operations @


From EGIWiki
Jump to navigation Jump to search
Main operations services Support Documentation Tools Activities Performance Technology Catch-all Services Resource Allocation Security

GOC DB menu: Home Documentation Index

<< Back to GOCDB/Release4/Development

Key-Value Pair Property Bag Extensiblity Mechanism


  • Original RT request:
  • Sites, Services and ServiceGroups can be extended so that they can define an optional set of custom key-value pairs (akin to GLUE2 ext mech).
  • Extend GUI and PI to filter sites/services by required key/value pair.
    • In the GUI filter sites/services via a key-value search.
    • Support the 'extensions' URL param on PI methods:
      • get_service_endpoint', 'get_site', 'get_site_list' 'get_service_group'
    • Support the 'site_extensions' and 'service_extensions' URL params on PI methods:
      • 'get_downtime' and 'get_downtime_nested_services'
  • There are a number of restrictions that could be relaxed if required, e.g. number of k=v pairs, and illegal chars.
  • The extensions parameters only support basic query syntax (e.g. no nesting of sub-queries).
  • The results of the get_site and get_service_endpoint PI queries nest new <EXTENSIONS> elements.
  • The format of the 'extensions' expression is one or more (key=value) pairs enclosed in brackets. (K=v) pairs can be optionally prefixed with one of following operators: AND, OR, NOT. If no operator is specified before the first (k=v) pair, then AND is assumed. The operator applies to ALL (k=v) pairs to the right of the operator until another operator is encountered, for example:

is equivalent to (note no leading AND):

Test Portal

PI Examples

get_site, get_site_list, get_service_endpoint, get_service_group

  • The get_site, get_site_list, get_service_endpoints and get_service_group PI methods will support the 'extensions' URL param. This can be used to filter the Sites and Services by the specified key-value pairs.

To return all sites that define VO with a value of Alice:


Use no value to define a wildcard search, i.e. all sites that define the VO property regardless of value:


Extensions also supports OR/AND/NOT operators. This can be used to search against multiple key values eg:


These can be used together:

?method= get_service_endpoint&extensions=OR(CPU_HS01_HOUR=1)(CPU_HS02_HOUR=2)

When no operator is specified the default is AND, therefore the following:

?method= get_service_endpoint&extensions=(CPU_HS01_HOUR=1)(CPU_HS02_HOUR=2)

Is the same as:

?method= get_service_endpoint&extensions=AND(CPU_HS01_HOUR=1)(CPU_HS02_HOUR=2)

The extensions parameter can also be used in conjunction with the existing parameters previously supported:


get_downtime, get_downtime_nested_services

  • The 'site_extensions' and 'service_extensions' can also be used on the 'get_downtime' and 'get_downtime_nested_services' methods using same logic described above. Note, the <EXTENSIONS> element is not rendered in the XML output for these queries.

PI Examples

These are currently in testing and can be viewed on the GocDB test server:


  • The extent to which the ldap syntax query string would be supported will have to be explored. A simplified version including only exact pattern matches and simple wildcards may cover most use cases.
  • The property bags may only be applied to a subset of entities and PI queries.

Sample PI XML Output

get_site (note new <EXTENSIONS>)

<?xml version="1.0" encoding="UTF-8"?>
		<OFFICIAL_NAME>HeCTOR, UK National Supercomputing Service
		<CONTACT_TEL>0131-650 5029</CONTACT_TEL>
		<COUNTRY>United Kingdom</COUNTRY>

get_service_endpoint (note new <EXTENSIONS>)

<?xml version="1.0" encoding="UTF-8"?>
        <COUNTRY_NAME>United Kingdom</COUNTRY_NAME>

get_service_group (note new <EXTENSIONS>)

<?xml version="1.0" encoding="UTF-8"?>
        <DESCRIPTION>testing servcie group</DESCRIPTION>
        <GOCDB_PORTAL_URL>https://localhost/portal/index.php?Page_Type=Service_Group amp id=689</GOCDB_PORTAL_URL>

Potential Use Cases

A number of potential use cases have been reported (, including:


There is the potential for proliferation of key-value pairs that should instead be recorded in fields/properties as part of the data model.