Policy Query Python Module¶
This is the module for quering the Policy service.
This module exports classes and methods for interacting with the designated Pacifica Policy server.
-
class
pacifica.uploader.metadata.policyquery.
PolicyQuery
(user, *args, **kwargs)[source]¶ Handle quering the policy server.
Instances of this class represent queries to the designated Pacifica Policy server.
-
__init__
(user, *args, **kwargs)[source]¶ Set the policy server url and define any data for the query.
The HTTP end-point for the policy server is automatically pulled either from the system environment or from the keyword arguments, **kwargs.
-
_addr
= None¶
-
_auth
= None¶
-
_ingest_path
= None¶
-
_ingest_url
= None¶
-
_port
= None¶
-
_proto
= None¶
-
_uploader_path
= None¶
-
_uploader_url
= None¶
-
get_results
()[source]¶ Get results from the Policy server for the query.
This method returns a JSON object that is the result set for a query to the Pacifica Policy server, i.e., the entities that match the criteria that is represented by the associated instance of the
pacifica.uploader.metadata.PolicyQuery.PolicyQueryData
class.
-
pq_data
= None¶
-
user_id
= None¶
-
valid_metadata
(md_obj)[source]¶ Check the metadata object against the ingest API.
This method validates the given instance of
pacifica.uploader.metadata.MetaData
,md_obj
, against the Pacifica Policy server endpoint.
-
-
class
pacifica.uploader.metadata.policyquery.
PolicyQueryData
[source]¶ Policy query data elements for policy query requests.
This class is a sub-class of the collections.namedtuple class. This class is used directly against the Pacifica Uploader Policy endpoint.
-
pacifica.uploader.metadata.policyquery.
_PolicyQueryData
¶ alias of
pacifica.uploader.metadata.policyquery.PolicyQueryData