remove old containers based on images Args: configuration: user final configuration Returns: True
(configuration)
| 151 | |
| 152 | |
| 153 | def remove_old_containers(configuration): |
| 154 | """ |
| 155 | remove old containers based on images |
| 156 | |
| 157 | Args: |
| 158 | configuration: user final configuration |
| 159 | |
| 160 | Returns: |
| 161 | True |
| 162 | """ |
| 163 | |
| 164 | containers_list = all_existing_containers() |
| 165 | for container in virtual_machine_names_to_container_names(configuration): |
| 166 | if container in containers_list: |
| 167 | info( |
| 168 | "removing container {0}".format( |
| 169 | os.popen( |
| 170 | "docker rm {0}".format(container) |
| 171 | ).read().rsplit()[0] |
| 172 | ) |
| 173 | ) |
| 174 | return True |
| 175 | |
| 176 | |
| 177 | def get_image_name_of_selected_modules(configuration): |
no test coverage detected