Skip to content
New issue

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

Documentation On How to Use The SDK For Updates #26

Open
robotmarkv opened this issue Aug 21, 2020 · 2 comments
Open

Documentation On How to Use The SDK For Updates #26

robotmarkv opened this issue Aug 21, 2020 · 2 comments

Comments

@robotmarkv
Copy link

The documentation is very limited.
Is it even possible to make updates using the SDK.
I am trying to work out how to silence specific alerts .

@virgilm
Copy link
Member

virgilm commented Aug 24, 2020

You have to use the 'set' method. There is a (very brief indeed) example in the README file.

Example to set an application instance name:

from dfs_sdk.scaffold import get_api
api = get_api()
ai = api.app_instances.list()[0]
print "App instance name: ", ai['name']
print "App instance UUID: ", ai['uuid']
ai.set(name = "new_name")
ai = api.app_instances.get(ai['uuid'])
print "App instance name: ", ai['name']

Output:

App instance name: ai_name
App instance UUID: 56e69c9c-642c-4fbc-b4ec-40444b0e261d
App instance name: new_name

  • One thing to note here is that you need to reload the object if you want to be able to have the new name

@robotmarkv
Copy link
Author

Thanks for the help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants