summaryrefslogtreecommitdiffstats
path: root/roles/lib_utils
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-01-13 14:29:48 -0500
committerKenny Woodson <kwoodson@redhat.com>2017-01-17 10:47:16 -0500
commitea33e223e34bb2b8efae6b165f3ac9729357cb46 (patch)
tree73c704561e5896835b1fcfbf281a7c700bfa4ee3 /roles/lib_utils
parent07331b47724dbb7cd6952c1a2af54275ace7726e (diff)
downloadopenshift-ea33e223e34bb2b8efae6b165f3ac9729357cb46.tar.gz
openshift-ea33e223e34bb2b8efae6b165f3ac9729357cb46.tar.bz2
openshift-ea33e223e34bb2b8efae6b165f3ac9729357cb46.tar.xz
openshift-ea33e223e34bb2b8efae6b165f3ac9729357cb46.zip
Adding oc_edit module to lib_openshift.
Diffstat (limited to 'roles/lib_utils')
-rw-r--r--roles/lib_utils/library/yedit.py4
-rw-r--r--roles/lib_utils/src/ansible/yedit.py1
-rw-r--r--roles/lib_utils/src/class/yedit.py2
-rw-r--r--roles/lib_utils/src/test/integration/kube-manager-test.yaml58
4 files changed, 7 insertions, 58 deletions
diff --git a/roles/lib_utils/library/yedit.py b/roles/lib_utils/library/yedit.py
index 90c7fd4d7..d882c983e 100644
--- a/roles/lib_utils/library/yedit.py
+++ b/roles/lib_utils/library/yedit.py
@@ -162,12 +162,15 @@ EXAMPLES = '''
# b:
# c: d
'''
+# noqa: E301,E302
+
class YeditException(Exception):
''' Exception class for Yedit '''
pass
+# pylint: disable=too-many-public-methods
class Yedit(object):
''' Class to modify yaml files '''
re_valid_key = r"(((\[-?\d+\])|([0-9a-zA-Z%s/_-]+)).?)+$"
@@ -724,6 +727,7 @@ class Yedit(object):
return {'failed': True, 'msg': 'Unkown state passed'}
+
# pylint: disable=too-many-branches
def main():
''' ansible oc module for secrets '''
diff --git a/roles/lib_utils/src/ansible/yedit.py b/roles/lib_utils/src/ansible/yedit.py
index efe034abf..8a1a7c2dc 100644
--- a/roles/lib_utils/src/ansible/yedit.py
+++ b/roles/lib_utils/src/ansible/yedit.py
@@ -1,6 +1,7 @@
# flake8: noqa
# pylint: skip-file
+
# pylint: disable=too-many-branches
def main():
''' ansible oc module for secrets '''
diff --git a/roles/lib_utils/src/class/yedit.py b/roles/lib_utils/src/class/yedit.py
index 4521009ab..b1644f9b2 100644
--- a/roles/lib_utils/src/class/yedit.py
+++ b/roles/lib_utils/src/class/yedit.py
@@ -1,5 +1,6 @@
# flake8: noqa
# pylint: skip-file
+# noqa: E301,E302
class YeditException(Exception):
@@ -7,6 +8,7 @@ class YeditException(Exception):
pass
+# pylint: disable=too-many-public-methods
class Yedit(object):
''' Class to modify yaml files '''
re_valid_key = r"(((\[-?\d+\])|([0-9a-zA-Z%s/_-]+)).?)+$"
diff --git a/roles/lib_utils/src/test/integration/kube-manager-test.yaml b/roles/lib_utils/src/test/integration/kube-manager-test.yaml
deleted file mode 100644
index aea8e668f..000000000
--- a/roles/lib_utils/src/test/integration/kube-manager-test.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
-apiVersion: v1
-kind: Pod
-metadata:
- name: kube-controller-manager
- namespace: kube-system
-spec:
- hostNetwork: true
- containers:
- - name: kube-controller-manager
- image: openshift/kube:v1.0.0
- command:
- - /hyperkube
- - controller-manager
- - --master=http://127.0.0.1:8080
- - --leader-elect=true
- - --service-account-private-key-file=/etc/kubernetes/ssl/apiserver-key.pem
- - --root-ca-file=/etc/k8s/ssl/my.pem
- - --my-new-parameter=openshift
- livenessProbe:
- httpGet:
- host: 127.0.0.1
- path: /healthz
- port: 10252
- initialDelaySeconds: 15
- timeoutSeconds: 1
- volumeMounts:
- - mountPath: /etc/kubernetes/ssl
- name: ssl-certs-kubernetes
- readOnly: true
- - mountPath: /etc/ssl/certs
- name: ssl-certs-host
- readOnly: 'true'
- volumes:
- - hostPath:
- path: /etc/kubernetes/ssl
- name: ssl-certs-kubernetes
- - hostPath:
- path: /usr/share/ca-certificates
- name: ssl-certs-host
-yedittest: yedittest
-metadata-namespace: openshift-is-awesome
-nonexistingkey:
-- --my-new-parameter=openshift
-a:
- b:
- c: d
-e:
- f:
- g:
- h:
- i:
- j: k
-z:
- x:
- y:
- - 1
- - 2
- - 3