Skip to content

Commit

Permalink
Add new "configuration show" command
Browse files Browse the repository at this point in the history
Sem-Ver: api-break
  • Loading branch information
alvarolopez committed Feb 25, 2021
1 parent 3fecfc1 commit d667d74
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 5 deletions.
5 changes: 5 additions & 0 deletions orpy/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,8 @@ class TOSCATemplate(BaseObject):
class OrchestratorInfo(BaseObject):
"""Object that represents the Orchestrtor information."""
pass


class OrchestratorConfiguration(BaseObject):
"""Object that represents the Orchestrtor information."""
pass
11 changes: 11 additions & 0 deletions orpy/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import six
from six.moves.urllib import parse

from orpy.client import config
from orpy.client import deployments
from orpy.client import info
from orpy.client import resources
Expand Down Expand Up @@ -89,6 +90,7 @@ def __init__(self, url, oidc_agent=None, token=None, debug=False):
self._deployments = deployments.Deployments(self)
self._resources = resources.Resources(self)
self._info = info.Info(self)
self._config = config.Config(self)

self._logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -133,6 +135,15 @@ def resources(self):
"""
return self._resources

@property
def config(self):
"""Interface to query for Orchestrator configuration.
:return: Configuration interface.
:rtype: orpy.info.Config
"""
return self._config

@property
def info(self):
"""Interface to query for Orchestrator information.
Expand Down
6 changes: 3 additions & 3 deletions orpy/cmd/deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ def take_action(self, parsed_args):
if not parsed_args.long:
rm = [
"links",
"cloudProviderEndpoint"
"physicalId"
"task"
"cloudProviderEndpoint",
"physicalId",
"task",
]
else:
rm = []
Expand Down
2 changes: 1 addition & 1 deletion orpy/cmd/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from orpy import utils


class TestOrchestratorEndpoint(show.ShowOne):
class OrchestratorEndpointInfo(show.ShowOne):
"""Test if the given URL is pointing to an orchestrator.
Use this command to check if the URL provided is actually from an INDIGO
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
features:
- |
New command `configuration show` allows to retrieve information from the
orchestrator regarding its configuration.
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ console_scripts =
orpy = orpy.shell:main

orpy.cli=
test = orpy.cmd.test:TestOrchestratorEndpoint
info = orpy.cmd.info:OrchestratorEndpointInfo
configuration_show = orpy.cmd.config:OrchestratorConfigShow
deployment_list = orpy.cmd.deployments:DeploymentList
dep_list = orpy.cmd.deployments:DeploymentList
deployment_show = orpy.cmd.deployments:DeploymentShow
Expand Down

0 comments on commit d667d74

Please sign in to comment.