forked from redhat-performance/quads
-
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
Integrate hil cli #54
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modify hil-specific methods from hil/haas/cli.py (adapted by @vsemp) into private helper methods in the HilInventoryDriver in order to provide a simplifying layer of abstraction to make the code more readable and developer friendly, while keeping all hil-specific actions encapsulated within the scope of the hil-specific drivers. Remove hil dependencies from the rest call wrappers, url creater, and status code checker and add them as class methods to the Quads object in libquads. The methods were primarily inventory related and are therefore placed in the HilInventoryDriver class. The HilNetworkDriver class can access the inventory information it needs through use of a HilInventoryDriver instance The following changes were made to the following files: - lib/hardware_services/inventory_drivers/HilInventoryDriver.py: - implement new private methods: - __list_projects - __project_create_network - __project_connect_node - __project_detach_node - __network_delete - __project_create - __project_delete - __list_nodes - __show_node - __node_connect_network - __node_detach_network - refactor existing public methods to use new private methods: - update_cloud - update_host - remove_cloud - remove_host - list_clouds - list_hosts - lib/libquads.py: - add class methods to wrap rest calls: - quads_urlify - quads_status_code_check - quads_put - quads_post - quads_get - quads_delete - add new member variable for api server url: - hardware_service_url - conf/quads.yml: - add hardware_service_url parameter in config file so it can be easily expanded to use other APIs than HIL - bin/quads.py - add defaulthardwareserviceurl variable set to new config parameter - add --set-hardware-service-url command line option to set parameter dynamically
Generally, looks fine. You can merge it. But try not to use **kwargs when the arguments are known upfront in the future. |
Merged via #56. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(@portante I forgot to squash the commits before pushing to my origin, and then could no longer squash them. Is there a way to just make a pull request for the final commit, or squash them before merging? )
Note: If cloning branch to test, must have HIL api server and HIL network server running for the HilInventoryDriver to work)
modify hil-specific methods from hil/haas/cli.py (adapted by @vsemp) into
private helper methods in the HilInventoryDriver in order to provide a
simplifying layer of abstraction to make the code more readable and developer
friendly, while keeping all hil-specific actions encapsulated within the scope
of the hil-specific drivers. Remove hil dependencies from the rest call wrappers,
url creater, and status code checker and add them as class methods to the Quads
object in libquads. The methods were primarily inventory related and are
therefore placed in the HilInventoryDriver class. The HilNetworkDriver class
can access the inventory information it needs through use of a HilInventoryDriver
instance
The following changes were made to the following files: