-
Notifications
You must be signed in to change notification settings - Fork 4
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
MockInventoryDriver.py QuadsNativeInventoryDriver.py functions #53
Conversation
Added init_data sync_data write_data load_data. Fucntions are the same for Mock and QuadsNative. The fucntions are just copies from libquads.py.
Changed only libquads.py so that now it uses our inventory_service class methods. Added load_data call and changed init_data, write_data, sync_state bodies so that now they call corresponding inventory_service class methods.
I added hilapi.py. This is a library to do REST calls to HIL with error checking, argument checking, error handling. The file hil.yml is necessary to store HIL server IP address. For now, we have this REST call functions in a stand alone file. This is a temporary solution. Opinion of mentors is necessary to decide what is the best place to keep this REST call wrappers. Later on we can easily delete these files and move code from these files elsewhere.
These append's were outdated. We don't use them anymore.
@@ -0,0 +1,2 @@ | |||
url: http://127.0.0.1:5000 # the address of HIL server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We discussed that. And I agreed with you. But I don't see it added.
So can we merge this first and then we can move this line anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def show_node(node): | ||
url = make_url('node', node) | ||
return do_get(url) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def show_node(node): | ||
url = make_url('node', node) | ||
return do_get(url) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vsemp did you test your changes before making this pr? I just cloned the branch and have not been able to get any commands to work without throwing errors when using QuadsNative or Mock as the hardware service. |
The bug was due to incorrect arguments in load_data nad write_data in libquads.py. That's why Quads didn't work.
@vsemp, when you rebase these changes on top of Also, please rebase onto |
Added init_data sync_data write_data load_data. Fucntions are the same for Mock and QuadsNative. The fucntions are just copies from libquads.py.