-
Notifications
You must be signed in to change notification settings - Fork 1
DeviceEnumerationPlugin #56
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
Conversation
| # Convert to lists if integers, otherwise use as-is | ||
| cpu_count = [args.cpu_count] if isinstance(args.cpu_count, int) else args.cpu_count | ||
| gpu_count = [args.gpu_count] if isinstance(args.gpu_count, int) else args.gpu_count | ||
| vf_count = [args.vf_count] if isinstance(args.vf_count, int) else args.vf_count |
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.
may be better to add field validators on the arg model to do this instead, and have the values always stored as lists in the model.
| cpu_count_res = self._run_sut_cmd(self.CMD_CPU_COUNT_WINDOWS) | ||
| gpu_count_res = self._run_sut_cmd(self.CMD_GPU_COUNT_WINDOWS) | ||
| vf_count_res = self._run_sut_cmd(self.CMD_VF_COUNT_WINDOWS) | ||
| cpu_count, gpu_count, vf_count = [None, None, None] |
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.
nit: Instead of having these extra vars we could instantiate the model here instead and use its defaults which would already be 'None'
New DeviceEnumerationPlugin, run:
How to test: run with plugin_config.json:
Cmd: