-
Delete all containers
$ docker ps -q -a | xargs docker rm -f
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
- Delete all untagged images
| <style type="text/css"> | |
| /* 1. Style header/footer <div> so they are positioned as desired. */ | |
| #header-left { | |
| position: absolute; | |
| top: 0%; | |
| left: 0%; | |
| } | |
| #header-right { | |
| position: absolute; | |
| top: 0%; |
| rabbitmqctl add_user test test | |
| rabbitmqctl set_user_tags test administrator | |
| rabbitmqctl set_permissions -p / test ".*" ".*" ".*" |
Delete all containers
$ docker ps -q -a | xargs docker rm -f
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
| #! /usr/bin/env python | |
| # vim: tabstop=4 shiftwidth=4 softtabstop=4 | |
| # Copyright 2013 AT&T Services, Inc. | |
| # All Rights Reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); you may | |
| # not use this file except in compliance with the License. You may obtain | |
| # a copy of the License at | |
| # |
| class LeastUtilizedScheduler(object): | |
| """Allocate a L3 agent for a new router that is the least utilized | |
| in terms of router count | |
| """ | |
| def auto_schedule_routers(self, plugin, context, host, router_ids): | |
| """Schedule non-hosted routers to L3 Agent running on host. | |
| If router_ids is given, each router in router_ids is scheduled | |
| if it is not scheduled yet. Otherwise all unscheduled routers | |
| are scheduled. | |
| Don't schedule the routers which are hosted already |