summaryrefslogtreecommitdiff
path: root/cloudinit/distros/parsers
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-01-20 10:06:55 -0500
committerScott Moser <smoser@brickies.net>2017-01-20 10:06:55 -0500
commitd00b7dba8767618ae360f56bf64b7ab7a8c49d2e (patch)
tree349799f76c39669a03a6acbd48502970c0abb994 /cloudinit/distros/parsers
parentfa3009b64949fef3744ddb940f01477dfa2d25e5 (diff)
parent7fb6f78177b5ece10ca7c54ba3958010a9987f06 (diff)
downloadvyos-cloud-init-d00b7dba8767618ae360f56bf64b7ab7a8c49d2e.tar.gz
vyos-cloud-init-d00b7dba8767618ae360f56bf64b7ab7a8c49d2e.zip
merge from 0.7.9 at 0.7.9
Diffstat (limited to 'cloudinit/distros/parsers')
-rw-r--r--cloudinit/distros/parsers/__init__.py20
-rw-r--r--cloudinit/distros/parsers/hostname.py20
-rw-r--r--cloudinit/distros/parsers/hosts.py20
-rw-r--r--cloudinit/distros/parsers/resolv_conf.py20
-rw-r--r--cloudinit/distros/parsers/sys_conf.py20
5 files changed, 25 insertions, 75 deletions
diff --git a/cloudinit/distros/parsers/__init__.py b/cloudinit/distros/parsers/__init__.py
index 1c413eaa..6b5b6dde 100644
--- a/cloudinit/distros/parsers/__init__.py
+++ b/cloudinit/distros/parsers/__init__.py
@@ -1,20 +1,8 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2012 Yahoo! Inc.
-#
-# Author: Joshua Harlow <harlowja@yahoo-inc.com>
+# Copyright (C) 2012 Yahoo! Inc.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
+# Author: Joshua Harlow <harlowja@yahoo-inc.com>
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
def chop_comment(text, comment_chars):
@@ -26,3 +14,5 @@ def chop_comment(text, comment_chars):
before_comment = text[0:min_comment]
comment = text[min_comment:]
return (before_comment, comment)
+
+# vi: ts=4 expandtab
diff --git a/cloudinit/distros/parsers/hostname.py b/cloudinit/distros/parsers/hostname.py
index efb185d4..dd434ac6 100644
--- a/cloudinit/distros/parsers/hostname.py
+++ b/cloudinit/distros/parsers/hostname.py
@@ -1,20 +1,8 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2012 Yahoo! Inc.
-#
-# Author: Joshua Harlow <harlowja@yahoo-inc.com>
+# Copyright (C) 2012 Yahoo! Inc.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
+# Author: Joshua Harlow <harlowja@yahoo-inc.com>
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
from six import StringIO
@@ -86,3 +74,5 @@ class HostnameConf(object):
raise IOError("Multiple hostnames (%s) found!"
% (hostnames_found))
return entries
+
+# vi: ts=4 expandtab
diff --git a/cloudinit/distros/parsers/hosts.py b/cloudinit/distros/parsers/hosts.py
index 3c5498ee..87f164be 100644
--- a/cloudinit/distros/parsers/hosts.py
+++ b/cloudinit/distros/parsers/hosts.py
@@ -1,20 +1,8 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2012 Yahoo! Inc.
-#
-# Author: Joshua Harlow <harlowja@yahoo-inc.com>
+# Copyright (C) 2012 Yahoo! Inc.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
+# Author: Joshua Harlow <harlowja@yahoo-inc.com>
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
from six import StringIO
@@ -90,3 +78,5 @@ class HostsConf(object):
pieces = "\t".join(pieces)
contents.write("%s%s\n" % (pieces, tail))
return contents.getvalue()
+
+# vi: ts=4 expandtab
diff --git a/cloudinit/distros/parsers/resolv_conf.py b/cloudinit/distros/parsers/resolv_conf.py
index 2ed13d9c..ff6ee307 100644
--- a/cloudinit/distros/parsers/resolv_conf.py
+++ b/cloudinit/distros/parsers/resolv_conf.py
@@ -1,20 +1,8 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2012 Yahoo! Inc.
-#
-# Author: Joshua Harlow <harlowja@yahoo-inc.com>
+# Copyright (C) 2012 Yahoo! Inc.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
+# Author: Joshua Harlow <harlowja@yahoo-inc.com>
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
from six import StringIO
@@ -167,3 +155,5 @@ class ResolvConf(object):
raise IOError("Unexpected resolv.conf option %s" % (cfg_opt))
entries.append(("option", [cfg_opt, cfg_values, tail]))
return entries
+
+# vi: ts=4 expandtab
diff --git a/cloudinit/distros/parsers/sys_conf.py b/cloudinit/distros/parsers/sys_conf.py
index 6157cf32..c27b5d5d 100644
--- a/cloudinit/distros/parsers/sys_conf.py
+++ b/cloudinit/distros/parsers/sys_conf.py
@@ -1,20 +1,8 @@
-# vi: ts=4 expandtab
-#
-# Copyright (C) 2012 Yahoo! Inc.
-#
-# Author: Joshua Harlow <harlowja@yahoo-inc.com>
+# Copyright (C) 2012 Yahoo! Inc.
#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 3, as
-# published by the Free Software Foundation.
+# Author: Joshua Harlow <harlowja@yahoo-inc.com>
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# This file is part of cloud-init. See LICENSE file for license information.
import six
from six import StringIO
@@ -111,3 +99,5 @@ class SysConf(configobj.ConfigObj):
self._a_to_u('='),
val,
cmnt)
+
+# vi: ts=4 expandtab