[lxc-devel] [lxd/master] test: Updates static_analysis.sh
tomponline on Github
lxc-bot at linuxcontainers.org
Tue Jul 16 17:31:29 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 361 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190716/6f48327f/attachment.bin>
-------------- next part --------------
From 52e817fdf572cd4ffe17a45acabeaccbaeaccebf Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parrott at canonical.com>
Date: Tue, 16 Jul 2019 18:30:58 +0100
Subject: [PATCH] test: Updates static_analysis.sh
Signed-off-by: Thomas Parrott <thomas.parrott at canonical.com>
---
lxd/iptables/iptables.go | 5 +++++
test/suites/static_analysis.sh | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/lxd/iptables/iptables.go b/lxd/iptables/iptables.go
index 93b556adda..2ec75314d9 100644
--- a/lxd/iptables/iptables.go
+++ b/lxd/iptables/iptables.go
@@ -103,29 +103,34 @@ func iptablesClear(protocol string, comment string, table string) error {
return nil
}
+// NetworkAppend adds a network rule at end of ruleset.
func NetworkAppend(protocol string, comment string, table string, chain string,
rule ...string) error {
return iptablesAppend(protocol, fmt.Sprintf("LXD network %s", comment),
table, chain, rule...)
}
+// NetworkPrepend adds a network rule at start of ruleset.
func NetworkPrepend(protocol string, comment string, table string, chain string,
rule ...string) error {
return iptablesPrepend(protocol, fmt.Sprintf("LXD network %s", comment),
table, chain, rule...)
}
+// NetworkClear removes network rules.
func NetworkClear(protocol string, comment string, table string) error {
return iptablesClear(protocol, fmt.Sprintf("LXD network %s", comment),
table)
}
+// ContainerPrepend adds container rule at start of ruleset.
func ContainerPrepend(protocol string, comment string, table string,
chain string, rule ...string) error {
return iptablesPrepend(protocol, fmt.Sprintf("LXD container %s", comment),
table, chain, rule...)
}
+// ContainerClear removes container rules.
func ContainerClear(protocol string, comment string, table string) error {
return iptablesClear(protocol, fmt.Sprintf("LXD container %s", comment),
table)
diff --git a/test/suites/static_analysis.sh b/test/suites/static_analysis.sh
index 338805808d..91faee47c5 100644
--- a/test/suites/static_analysis.sh
+++ b/test/suites/static_analysis.sh
@@ -87,6 +87,10 @@ test_static_analysis() {
golint -set_exit_status lxd/template
golint -set_exit_status lxd/types
golint -set_exit_status lxd/util
+ golint -set_exit_status lxd/device/...
+ golint -set_exit_status lxd/dnsmasq/...
+ golint -set_exit_status lxd/iptables/...
+ golint -set_exit_status lxd/instance/...
golint -set_exit_status shared/api/
golint -set_exit_status shared/cancel/
More information about the lxc-devel
mailing list