Kami commented on a change in pull request #1477:
URL: https://github.com/apache/libcloud/pull/1477#discussion_r464069120
##########
File path: libcloud/compute/drivers/kubevirt.py
##########
@@ -167,10 +165,17 @@ def destroy_node(self, node):
"""
namespace = node.extra['namespace']
name = node.name
- # stop the vmi first
+ # find and delete services for this VM only
+ services = self.ex_list_services(namespace=namespace, node_name=name)
+ for service in services:
+ service_type = service['spec']['type']
+ self.ex_create_service(node=node, ports=[],
Review comment:
I think it would be better to have another ``ex_delete_service`` method
which can call ``ex_create_service`` underneath with those arguments.
Also, from the method docstring it looks like you may need to specify
``override_existing_ports`` argument. Or is it not needed?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]