Skip to content

Commit

Permalink
Merge pull request #378 from rapyuta-robotics/devel
Browse files Browse the repository at this point in the history
🎉 release: v9.1.2
  • Loading branch information
ankitrgadiya authored Oct 22, 2024
2 parents fa9181e + ddc0f1a commit bc8f5c1
Showing 1 changed file with 33 additions and 14 deletions.
47 changes: 33 additions & 14 deletions riocli/apply/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bc8f5c1

Please sign in to comment.