We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When creating a resource with a script i use (python):
attributes = json.loads(os.environ.get("ATTRIBUTES"))
To access the attributes of a resource.
However in a termination script i cant use the same method it seems to access the attributes as it gives me the following error:
2024-02-14T13:53:32.944140165Z [2024-02-14 13:53:32,943: ERROR/ForkPoolWorker-9] Error processing order type: Terminate, offering: Storage Share fs.ti, created_by: 089353b4-782e-44ba-a88a-382920d816e8 (Matthew Frost). Order ID: 129. Exception: [ErrorDetail(string='Command '['python', 'script']' in image 'mattronix:alpine-py-3.11' returned non-zero exit status 1: b'Traceback (most recent call last):\n File "/work/script", line 117, in \n new_user = attributes["username"]\n
When i do a print its also not set it seems, however i do see them in the database.
(once im finished with these scripts il send them your way also for the examples)
The text was updated successfully, but these errors were encountered:
In case its useful im publishing my work here: https://github.com/mattronix/waldur-custom-offerings/blob/main/create_user_over_ssh/storage-user-add-waldur.py
its a script for a very basic add user + samba share.
Sorry, something went wrong.
did you get a chance to look at this?
Expose attributes of resource in all custom scripts [GH-53]
d4691d9
No branches or pull requests
When creating a resource with a script i use (python):
To access the attributes of a resource.
However in a termination script i cant use the same method it seems to access the attributes as it gives me the following error:
2024-02-14T13:53:32.944140165Z [2024-02-14 13:53:32,943: ERROR/ForkPoolWorker-9] Error processing order type: Terminate, offering: Storage Share fs.ti, created_by: 089353b4-782e-44ba-a88a-382920d816e8 (Matthew Frost). Order ID: 129. Exception: [ErrorDetail(string='Command '['python', 'script']' in image 'mattronix:alpine-py-3.11' returned non-zero exit status 1: b'Traceback (most recent call last):\n File "/work/script", line 117, in \n new_user = attributes["username"]\n
When i do a print its also not set it seems, however i do see them in the database.
(once im finished with these scripts il send them your way also for the examples)
The text was updated successfully, but these errors were encountered: