Title: OpenStack YAML output problem · Issue #38 · StackStorm-Exchange/stackstorm-openstack · GitHub
Open Graph Title: OpenStack YAML output problem · Issue #38 · StackStorm-Exchange/stackstorm-openstack
X Title: OpenStack YAML output problem · Issue #38 · StackStorm-Exchange/stackstorm-openstack
Description: When running openstack commands (I was using server show action) if the output is in yaml format I attempt either str( result() ) - or - '{{ result() | to_yaml_string }}' and I output this is a variable; however, I can not use '{{ ctx()....
Open Graph Description: When running openstack commands (I was using server show action) if the output is in yaml format I attempt either str( result() ) - or - '{{ result() | to_yaml_string }}' and I output this is a var...
X Description: When running openstack commands (I was using server show action) if the output is in yaml format I attempt either str( result() ) - or - '{{ result() | to_yaml_string }}' and I output this ...
Opengraph URL: https://github.com/StackStorm-Exchange/stackstorm-openstack/issues/38
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"OpenStack YAML output problem","articleBody":"When running openstack commands (I was using server show action) if the output is in yaml format I attempt either \r\nstr( result() ) - or - '{{ result() | to_yaml_string }}' and I output this is a variable; however, I can not use \r\n'{{ ctx().variable | from _yaml_string }}' to output this back to a json object, as it's throwing the following error.\r\n\r\n\"JinjaEvaluationException: Unable to evaluate expression '{{ ctx().variable | from_yaml_string }}'. ScannerError: mapping values are not allowed in this context\\n in \\\"\u003cunicode string>\\\", line 1, column 57\"\r\n\r\nif however, I send the yaml output to a file (action core.local command - server show > yaml.txt)\r\nI'm able to \"cat\" the files contents and use '{{ result().stdout | from_yaml_string }}' and the output looks perfect.\r\n\r\nUnderstood that I can output json instead of yaml from the original command; however, the json output does not provide access to the values within the object - for example (please ignore appropriate json formatting)\r\n\r\naddresses = { network1: 1.1.1.1 network2: 2.2.2.2 etc...}\r\nThe object addresses just produces a long string of text that we need to parse through using regex\r\n\r\nif I import from yaml I'm able to address sub-objects directly - for example\r\n\r\nresult().addresses.network1 = 1.1.1.1\r\nresult().addresses.network2 = 2.2.2.2\r\n\r\nthis would be much simpler to just reference the object directly as the network name never changes but openstack's output changes the order of the \"networks\" listed which make regex matching all the more difficult.\r\n\r\nCertainly would welcome any guidance \r\n","author":{"url":"https://github.com/rickogg","@type":"Person","name":"rickogg"},"datePublished":"2022-10-26T17:08:15Z","url":"https://github.com/StackStorm-Exchange/stackstorm-openstack/issues/38"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3ab6e245-b3e0-8da1-e408-b12dac33a0d0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 92C8:375755:428F1A:584B0F:6B05E262 |
| html-safe-nonce | d86cec58642b657404d1704aafbc29e6dc4648a25fad83063548650c82e5d638 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkM4OjM3NTc1NTo0MjhGMUE6NTg0QjBGOjZCMDVFMjYyIiwidmlzaXRvcl9pZCI6IjkxMzQzNDIwMTM3NTg4NTc4MjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | cae29301c6c789bbcb52ab824b833b13d6a8bbd6f254f4dff7448721acc9ed20 |
| hovercard-subject-tag | issue:1424398794 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/StackStorm-Exchange/stackstorm-openstack/38/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3be4d6537dfe7f0c9fadeacaf4ad4e542877a74a9b90c1e68a523233f781fbb1/StackStorm-Exchange/stackstorm-openstack/issues/38 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3be4d6537dfe7f0c9fadeacaf4ad4e542877a74a9b90c1e68a523233f781fbb1/StackStorm-Exchange/stackstorm-openstack/issues/38 |
| og:image:alt | When running openstack commands (I was using server show action) if the output is in yaml format I attempt either str( result() ) - or - '{{ result() | to_yaml_string }}' and I output this is a var... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rickogg |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9e6b0e6e5a9a8e0ddb968297ede4e2eac72d30ea174a0970eb8f22d6958e91e3 |
| turbo-cache-control | no-preview |
| go-import | github.com/StackStorm-Exchange/stackstorm-openstack git https://github.com/StackStorm-Exchange/stackstorm-openstack.git |
| octolytics-dimension-user_id | 20677668 |
| octolytics-dimension-user_login | StackStorm-Exchange |
| octolytics-dimension-repository_id | 75043220 |
| octolytics-dimension-repository_nwo | StackStorm-Exchange/stackstorm-openstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 75043220 |
| octolytics-dimension-repository_network_root_nwo | StackStorm-Exchange/stackstorm-openstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 023691d14ad20c90d3ee61b0a0977b17dc6b6361 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width