diff options
author | Tim Bielawa <tbielawa@redhat.com> | 2017-01-23 09:10:10 -0800 |
---|---|---|
committer | Tim Bielawa <tbielawa@redhat.com> | 2017-01-24 08:19:08 -0800 |
commit | cf5f85ff884107cfba3ac929d2f731d98f467ce0 (patch) | |
tree | 6f086121f8c4f130d92d4e09a7b6d5224e50f569 /roles/lib_openshift/library | |
parent | 14ddb400093cbfb4abeca60b7edc434fcf380315 (diff) | |
download | openshift-cf5f85ff884107cfba3ac929d2f731d98f467ce0.tar.gz openshift-cf5f85ff884107cfba3ac929d2f731d98f467ce0.tar.bz2 openshift-cf5f85ff884107cfba3ac929d2f731d98f467ce0.tar.xz openshift-cf5f85ff884107cfba3ac929d2f731d98f467ce0.zip |
Generate the artifacts from fragments.
Diffstat (limited to 'roles/lib_openshift/library')
-rw-r--r-- | roles/lib_openshift/library/oc_edit.py | 24 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_obj.py | 24 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_route.py | 28 | ||||
-rw-r--r-- | roles/lib_openshift/library/oc_version.py | 24 |
4 files changed, 100 insertions, 0 deletions
diff --git a/roles/lib_openshift/library/oc_edit.py b/roles/lib_openshift/library/oc_edit.py index 1a361ae20..2338d5e8e 100644 --- a/roles/lib_openshift/library/oc_edit.py +++ b/roles/lib_openshift/library/oc_edit.py @@ -24,6 +24,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +# -*- -*- -*- Begin included fragment: lib/import.py -*- -*- -*- ''' OpenShiftCLI class that wraps the oc commands in a subprocess ''' @@ -40,6 +42,10 @@ import subprocess import ruamel.yaml as yaml from ansible.module_utils.basic import AnsibleModule +# -*- -*- -*- End included fragment: lib/import.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: doc/edit -*- -*- -*- + DOCUMENTATION = ''' --- module: oc_edit @@ -153,6 +159,10 @@ oc_edit: spec.template.spec.containers[0].resources.limits.memory: 512 spec.template.spec.containers[0].resources.requests.memory: 256 ''' + +# -*- -*- -*- End included fragment: doc/edit -*- -*- -*- + +# -*- -*- -*- Begin included fragment: ../../lib_utils/src/class/yedit.py -*- -*- -*- # noqa: E301,E302 @@ -717,6 +727,10 @@ class Yedit(object): 'state': "present"} return {'failed': True, 'msg': 'Unkown state passed'} + +# -*- -*- -*- End included fragment: ../../lib_utils/src/class/yedit.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: lib/base.py -*- -*- -*- # pylint: disable=too-many-lines # noqa: E301,E302,E303,T001 @@ -1238,6 +1252,10 @@ class OpenShiftCLIConfig(object): return rval +# -*- -*- -*- End included fragment: lib/base.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: class/oc_edit.py -*- -*- -*- + class Edit(OpenShiftCLI): ''' Class to wrap the oc command line tools ''' @@ -1330,6 +1348,10 @@ class Edit(OpenShiftCLI): return {"changed": True, 'results': api_rval, 'state': 'present'} +# -*- -*- -*- End included fragment: class/oc_edit.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: ansible/oc_edit.py -*- -*- -*- + def main(): ''' @@ -1375,3 +1397,5 @@ def main(): if __name__ == '__main__': main() + +# -*- -*- -*- End included fragment: ansible/oc_edit.py -*- -*- -*- diff --git a/roles/lib_openshift/library/oc_obj.py b/roles/lib_openshift/library/oc_obj.py index 5b501484b..ac24c35ca 100644 --- a/roles/lib_openshift/library/oc_obj.py +++ b/roles/lib_openshift/library/oc_obj.py @@ -24,6 +24,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +# -*- -*- -*- Begin included fragment: lib/import.py -*- -*- -*- ''' OpenShiftCLI class that wraps the oc commands in a subprocess ''' @@ -40,6 +42,10 @@ import subprocess import ruamel.yaml as yaml from ansible.module_utils.basic import AnsibleModule +# -*- -*- -*- End included fragment: lib/import.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: doc/obj -*- -*- -*- + DOCUMENTATION = ''' --- module: oc_obj @@ -132,6 +138,10 @@ oc_obj: namespace: default register: router_output ''' + +# -*- -*- -*- End included fragment: doc/obj -*- -*- -*- + +# -*- -*- -*- Begin included fragment: ../../lib_utils/src/class/yedit.py -*- -*- -*- # noqa: E301,E302 @@ -696,6 +706,10 @@ class Yedit(object): 'state': "present"} return {'failed': True, 'msg': 'Unkown state passed'} + +# -*- -*- -*- End included fragment: ../../lib_utils/src/class/yedit.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: lib/base.py -*- -*- -*- # pylint: disable=too-many-lines # noqa: E301,E302,E303,T001 @@ -1217,6 +1231,10 @@ class OpenShiftCLIConfig(object): return rval +# -*- -*- -*- End included fragment: lib/base.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: class/oc_obj.py -*- -*- -*- + # pylint: disable=too-many-instance-attributes class OCObject(OpenShiftCLI): ''' Class to wrap the oc command line tools ''' @@ -1408,6 +1426,10 @@ class OCObject(OpenShiftCLI): return {'changed': True, 'results': api_rval, 'state': "present"} +# -*- -*- -*- End included fragment: class/oc_obj.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: ansible/oc_obj.py -*- -*- -*- + # pylint: disable=too-many-branches def main(): ''' @@ -1442,3 +1464,5 @@ def main(): if __name__ == '__main__': main() + +# -*- -*- -*- End included fragment: ansible/oc_obj.py -*- -*- -*- diff --git a/roles/lib_openshift/library/oc_route.py b/roles/lib_openshift/library/oc_route.py index 19c7462ea..f5d6c3dfe 100644 --- a/roles/lib_openshift/library/oc_route.py +++ b/roles/lib_openshift/library/oc_route.py @@ -24,6 +24,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +# -*- -*- -*- Begin included fragment: lib/import.py -*- -*- -*- ''' OpenShiftCLI class that wraps the oc commands in a subprocess ''' @@ -40,6 +42,10 @@ import subprocess import ruamel.yaml as yaml from ansible.module_utils.basic import AnsibleModule +# -*- -*- -*- End included fragment: lib/import.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: doc/route -*- -*- -*- + DOCUMENTATION = ''' --- module: oc_route @@ -157,6 +163,10 @@ EXAMPLES = ''' tls_termination: reencrypt run_once: true ''' + +# -*- -*- -*- End included fragment: doc/route -*- -*- -*- + +# -*- -*- -*- Begin included fragment: ../../lib_utils/src/class/yedit.py -*- -*- -*- # noqa: E301,E302 @@ -721,6 +731,10 @@ class Yedit(object): 'state': "present"} return {'failed': True, 'msg': 'Unkown state passed'} + +# -*- -*- -*- End included fragment: ../../lib_utils/src/class/yedit.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: lib/base.py -*- -*- -*- # pylint: disable=too-many-lines # noqa: E301,E302,E303,T001 @@ -1241,6 +1255,10 @@ class OpenShiftCLIConfig(object): return rval + +# -*- -*- -*- End included fragment: lib/base.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: lib/route.py -*- -*- -*- # noqa: E302,E301 @@ -1363,6 +1381,10 @@ class Route(Yedit): ''' return wildcardPolicy ''' return self.get(Route.wildcard_policy) +# -*- -*- -*- End included fragment: lib/route.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: class/oc_route.py -*- -*- -*- + # pylint: disable=too-many-instance-attributes class OCRoute(OpenShiftCLI): @@ -1531,6 +1553,10 @@ class OCRoute(OpenShiftCLI): # catch all return {'failed': True, 'msg': "Unknown State passed"} +# -*- -*- -*- End included fragment: class/oc_route.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: ansible/oc_route.py -*- -*- -*- + def get_cert_data(path, content): '''get the data for a particular value''' @@ -1612,3 +1638,5 @@ def main(): if __name__ == '__main__': main() + +# -*- -*- -*- End included fragment: ansible/oc_route.py -*- -*- -*- diff --git a/roles/lib_openshift/library/oc_version.py b/roles/lib_openshift/library/oc_version.py index 197a0a947..5ee3e9c9b 100644 --- a/roles/lib_openshift/library/oc_version.py +++ b/roles/lib_openshift/library/oc_version.py @@ -24,6 +24,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # + +# -*- -*- -*- Begin included fragment: lib/import.py -*- -*- -*- ''' OpenShiftCLI class that wraps the oc commands in a subprocess ''' @@ -40,6 +42,10 @@ import subprocess import ruamel.yaml as yaml from ansible.module_utils.basic import AnsibleModule +# -*- -*- -*- End included fragment: lib/import.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: doc/version -*- -*- -*- + DOCUMENTATION = ''' --- module: oc_version @@ -77,6 +83,10 @@ oc_version: oc_version: register: oc_version ''' + +# -*- -*- -*- End included fragment: doc/version -*- -*- -*- + +# -*- -*- -*- Begin included fragment: ../../lib_utils/src/class/yedit.py -*- -*- -*- # noqa: E301,E302 @@ -641,6 +651,10 @@ class Yedit(object): 'state': "present"} return {'failed': True, 'msg': 'Unkown state passed'} + +# -*- -*- -*- End included fragment: ../../lib_utils/src/class/yedit.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: lib/base.py -*- -*- -*- # pylint: disable=too-many-lines # noqa: E301,E302,E303,T001 @@ -1162,6 +1176,10 @@ class OpenShiftCLIConfig(object): return rval +# -*- -*- -*- End included fragment: lib/base.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: class/oc_version.py -*- -*- -*- + # pylint: disable=too-many-instance-attributes class OCVersion(OpenShiftCLI): @@ -1207,6 +1225,10 @@ class OCVersion(OpenShiftCLI): 'results': result, 'changed': False} +# -*- -*- -*- End included fragment: class/oc_version.py -*- -*- -*- + +# -*- -*- -*- Begin included fragment: ansible/oc_version.py -*- -*- -*- + def main(): ''' ansible oc module for version ''' @@ -1230,3 +1252,5 @@ def main(): if __name__ == '__main__': main() + +# -*- -*- -*- End included fragment: ansible/oc_version.py -*- -*- -*- |