def getAllContainers(self, client): """ Returns all the matching containers for this component. """ containers = [] for container in client.containers(): if container['Image'] == self.config.getFullImage() or getContainerComponent(container) == self.getName(): containers.append(container) return containers
def getAllContainers(self, client): """ Returns all the matching containers for this component. """ containers = [] for container in client.containers(): if (container['Image'] == self.config.getFullImage() or getContainerComponent(container) == self.getName()): containers.append(container) return containers
def getAllContainers(self, client): """ Returns all the matching containers for this component. """ containers = [] for container in client.containers(): containerName = getContainerComponent(container) if ( not containerName and container["Image"] == self.config.getFullImage() ) or containerName == self.getName(): containers.append(container) return containers