Files
fm-orchestrator/test-pdc.py
Lubos Kocman 9eb5c25e25 Add rida/pdc.py - A rida related product definition center calls
* renamed and split config.pdc to config.pdc_url, config.pdc_insecure, config.pdc_develop
* test-pdc.py contains example usage

Signed-off-by: Lubos Kocman <lkocman@redhat.com>
2016-07-13 10:31:13 +02:00

23 lines
689 B
Python
Executable File

#!/usr/bin/env python3
""" A little script to test pdc interaction. """
from rida.pdc import *
from rida.config import Config
cfg = Config()
cfg.pdc_url = "http://fed-mod.org:8000/rest_api/v1"
cfg.pdc_insecure = True
cfg.pdc_develop = True
pdc_session = get_pdc_client_session(cfg)
module = get_module(pdc_session, {'name': 'testmodule', 'version': '1.0'})
if module:
print ("pdc_data=%s" % str(module))
print ("deps=[%s]" % ", ".join(get_module_dependencies(pdc_session, module)))
print ("build_deps=[%s]" % ", ".join(get_module_build_dependencies(pdc_session, module)))
print ("tag=%s" % get_module_tag(pdc_session, module))
else:
print ('module was not found')