correct some boilerplates

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown 2017-12-01 16:40:23 -06:00
parent 4c7974fe97
commit 009e40f280
8 changed files with 31 additions and 4 deletions

View File

@ -1,22 +1,36 @@
#!/bin/bash
# Copyright 2017 The Kubernetes Authors.
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
CRICTL_CLI="crictl --runtime-endpoint /var/run/cri-containerd.sock "
crictl_stop_running_containers() {
for x in $($CRICTL_CLI ps | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
for x in $($CRICTL_CLI ps | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
$CRICTL_CLI stop $x
done
}
crictl_rm_stopped_containers() {
$CRICTL_CLI ps | awk '{ print $1 }' | awk '{if(NR>1)print}'
$CRICTL_CLI ps | awk '{ print $1 }' | awk '{if(NR>1)print}'
for x in $($CRICTL_CLI ps | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
$CRICTL_CLI rm $x
done
}
crictl_stop_sandboxes() {
for x in $($CRICTL_CLI sandboxes | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
for x in $($CRICTL_CLI sandboxes | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
$CRICTL_CLI stops $x
done
}
@ -28,7 +42,7 @@ crictl_rm_sandboxes() {
}
crictl_rm_images() {
for x in $($CRICTL_CLI images | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
for x in $($CRICTL_CLI images | awk '{ print $1 }' | awk '{if(NR>1)print}') ;do
$CRICTL_CLI rmi $x
done
}

View File

@ -13,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o nounset
set -o pipefail

View File

@ -13,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o nounset
set -o pipefail

View File

@ -13,6 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
set -o nounset
set -o pipefail

View File

@ -1,9 +1,12 @@
/*
Copyright 2017 The Kubernetes Authors.
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

View File

@ -1,9 +1,12 @@
/*
Copyright 2017 The Kubernetes Authors.
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

View File

@ -1,9 +1,12 @@
/*
Copyright 2017 The Kubernetes Authors.
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

View File

@ -1,5 +1,6 @@
/*
Copyright 2017 The Kubernetes Authors.
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