-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #378 from rapyuta-robotics/devel
🎉 release: v9.1.2
- Loading branch information
Showing
1 changed file
with
33 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,13 @@ | |
print_resolved_objects, | ||
) | ||
from riocli.config import Configuration | ||
from riocli.constants import ApplyResult, Colors, Symbols | ||
from riocli.exceptions import ResourceNotFound | ||
from riocli.constants import Colors, Symbols, ApplyResult | ||
from riocli.exceptions import ( | ||
NoProjectSelected, | ||
NoOrganizationSelected, | ||
ResourceNotFound, | ||
LoggedOut, | ||
) | ||
from riocli.utils import dump_all_yaml, print_centered_text, run_bash | ||
from riocli.utils.graph import Graphviz | ||
from riocli.utils.spinner import with_spinner | ||
|
@@ -475,18 +480,32 @@ def _get_object_key(obj: dict) -> str: | |
def _inject_rio_namespace(self, values: typing.Optional[dict] = None) -> dict: | ||
values = values or {} | ||
|
||
rio = { | ||
"project": { | ||
"name": self.config.data.get("project_name"), | ||
"guid": self.config.project_guid, | ||
}, | ||
"organization": { | ||
"name": self.config.data.get("organization_name"), | ||
"guid": self.config.organization_guid, | ||
"short_id": self.config.organization_short_id, | ||
}, | ||
"email_id": self.config.data.get("email_id"), | ||
} | ||
try: | ||
rio = { | ||
"project": { | ||
"name": self.config.data.get("project_name"), | ||
"guid": self.config.project_guid, | ||
}, | ||
"organization": { | ||
"name": self.config.data.get("organization_name"), | ||
"guid": self.config.organization_guid, | ||
"short_id": self.config.organization_short_id, | ||
}, | ||
"email_id": self.config.data.get("email_id"), | ||
} | ||
except (LoggedOut, NoProjectSelected, NoOrganizationSelected): | ||
rio = { | ||
"project": { | ||
"name": "project-name", | ||
"guid": "project-guid", | ||
}, | ||
"organization": { | ||
"name": "org-name", | ||
"guid": "org-guid", | ||
"short_id": "org-short", | ||
}, | ||
"email_id": "[email protected]", | ||
} | ||
|
||
if "rio" in values: | ||
benedict(values["rio"]).merge(rio) | ||
|