From 749be3cf2425c73441d7478032d183b7a87bb8ee Mon Sep 17 00:00:00 2001 From: Murtuza Saleh Date: Mon, 10 Aug 2020 22:39:18 +0530 Subject: [PATCH 1/3] [WIP][13.0][ADD] connector_openshift --- connector_openshift/README.rst | 22 ++++++ connector_openshift/__init__.py | 3 + connector_openshift/__manifest__.py | 23 ++++++ connector_openshift/models/__init__.py | 3 + .../models/backend_openshift.py | 39 +++++++++ .../security/ir.model.access.csv | 2 + .../views/backend_openshift_view.xml | 79 +++++++++++++++++++ 7 files changed, 171 insertions(+) create mode 100644 connector_openshift/README.rst create mode 100644 connector_openshift/__init__.py create mode 100644 connector_openshift/__manifest__.py create mode 100644 connector_openshift/models/__init__.py create mode 100644 connector_openshift/models/backend_openshift.py create mode 100644 connector_openshift/security/ir.model.access.csv create mode 100644 connector_openshift/views/backend_openshift_view.xml diff --git a/connector_openshift/README.rst b/connector_openshift/README.rst new file mode 100644 index 0000000..da68284 --- /dev/null +++ b/connector_openshift/README.rst @@ -0,0 +1,22 @@ +=================== +Openshift Connector +=================== + +Openshift Connector + +Usage +===== + +Credits +======= + +Authors +~~~~~~~ + +* Open Source Integrators + +Contributors +~~~~~~~~~~~~ + +* Maxime Chambreuil +* Serpent Consulting Services Pvt. Ltd. diff --git a/connector_openshift/__init__.py b/connector_openshift/__init__.py new file mode 100644 index 0000000..83e553a --- /dev/null +++ b/connector_openshift/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/connector_openshift/__manifest__.py b/connector_openshift/__manifest__.py new file mode 100644 index 0000000..8dc0df3 --- /dev/null +++ b/connector_openshift/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright (C) 2020 Open Source Integrators +# Copyright (C) 2020 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) + +{ + 'name': 'Openshift Connector', + 'summary': '''Openshift Connector''', + 'version': '13.0.1.0.0', + 'license': 'AGPL-3', + 'author': 'Open Source Integrators', + 'website': 'https://github.com/OCA/infrastructure', + 'category': 'Tools', + 'depends': [ + 'connector', + ], + 'data': [ + 'security/ir.model.access.csv', + 'views/backend_openshift_view.xml', + ], + 'installable': True, + 'maintainers': ['max3903'], + 'development_status': 'Beta', +} diff --git a/connector_openshift/models/__init__.py b/connector_openshift/models/__init__.py new file mode 100644 index 0000000..fa503ae --- /dev/null +++ b/connector_openshift/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import backend_openshift diff --git a/connector_openshift/models/backend_openshift.py b/connector_openshift/models/backend_openshift.py new file mode 100644 index 0000000..c45f070 --- /dev/null +++ b/connector_openshift/models/backend_openshift.py @@ -0,0 +1,39 @@ +# Copyright (C) 2020 Open Source Integrators +# Copyright (C) 2020 Serpent Consulting Services Pvt. Ltd. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class BackendOpenshift(models.Model): + _name = "backend.openshift" + _description = "Openshift Backend" + + name = fields.Char( + 'Name', + required=True, + ) + api_url = fields.Char( + 'API URL', + required=True, + ) + token = fields.Char( + 'Token', + required=True, + ) + apps_domain = fields.Char( + 'Apps Domain', + required=True, + ) + create_project = fields.Text( + 'Create Project' + ) + suspend_project = fields.Text( + 'Suspend Project' + ) + resume_project = fields.Text( + 'Resume Project' + ) + close_project = fields.Text( + 'Close Project' + ) diff --git a/connector_openshift/security/ir.model.access.csv b/connector_openshift/security/ir.model.access.csv new file mode 100644 index 0000000..22def5f --- /dev/null +++ b/connector_openshift/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_backend_openshift,access.backend.openshift,model_backend_openshift,base.group_user,1,1,1,1 diff --git a/connector_openshift/views/backend_openshift_view.xml b/connector_openshift/views/backend_openshift_view.xml new file mode 100644 index 0000000..dcbe81f --- /dev/null +++ b/connector_openshift/views/backend_openshift_view.xml @@ -0,0 +1,79 @@ + + + + backend.openshift.tree + backend.openshift + + + + + + + + + + + + backend.openshift.form + backend.openshift + +
+ +
+

+ +

+
+ + + + + + + + + + + + + + + + + + + +
+
+
+
+ + + backend.openshift.search + backend.openshift + + + + + + + + + Openshift Backend + backend.openshift + ir.actions.act_window + tree,form + + + + + + +
From dd398e21a4248f203b5495f207867a8659051e04 Mon Sep 17 00:00:00 2001 From: Murtuza Saleh Date: Tue, 11 Aug 2020 10:24:45 +0530 Subject: [PATCH 2/3] [FIX] black + flake8 --- connector_openshift/__manifest__.py | 29 ++++------ .../models/backend_openshift.py | 36 +++--------- .../views/backend_openshift_view.xml | 55 +++++++++---------- oca_dependencies.txt | 1 + setup/.setuptools-odoo-make-default-ignore | 2 + setup/README | 2 + .../odoo/addons/connector_openshift | 1 + setup/connector_openshift/setup.py | 6 ++ 8 files changed, 58 insertions(+), 74 deletions(-) create mode 100644 oca_dependencies.txt create mode 100644 setup/.setuptools-odoo-make-default-ignore create mode 100644 setup/README create mode 120000 setup/connector_openshift/odoo/addons/connector_openshift create mode 100644 setup/connector_openshift/setup.py diff --git a/connector_openshift/__manifest__.py b/connector_openshift/__manifest__.py index 8dc0df3..7849e64 100644 --- a/connector_openshift/__manifest__.py +++ b/connector_openshift/__manifest__.py @@ -3,21 +3,16 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) { - 'name': 'Openshift Connector', - 'summary': '''Openshift Connector''', - 'version': '13.0.1.0.0', - 'license': 'AGPL-3', - 'author': 'Open Source Integrators', - 'website': 'https://github.com/OCA/infrastructure', - 'category': 'Tools', - 'depends': [ - 'connector', - ], - 'data': [ - 'security/ir.model.access.csv', - 'views/backend_openshift_view.xml', - ], - 'installable': True, - 'maintainers': ['max3903'], - 'development_status': 'Beta', + "name": "Openshift Connector", + "summary": """Openshift Connector""", + "version": "13.0.1.0.0", + "license": "AGPL-3", + "author": "Odoo Community Association (OCA), Open Source Integrators", + "website": "https://github.com/OCA/infrastructure", + "category": "Tools", + "depends": ["connector"], + "data": ["security/ir.model.access.csv", "views/backend_openshift_view.xml"], + "installable": True, + "maintainers": ["max3903"], + "development_status": "Beta", } diff --git a/connector_openshift/models/backend_openshift.py b/connector_openshift/models/backend_openshift.py index c45f070..1fd86f9 100644 --- a/connector_openshift/models/backend_openshift.py +++ b/connector_openshift/models/backend_openshift.py @@ -9,31 +9,11 @@ class BackendOpenshift(models.Model): _name = "backend.openshift" _description = "Openshift Backend" - name = fields.Char( - 'Name', - required=True, - ) - api_url = fields.Char( - 'API URL', - required=True, - ) - token = fields.Char( - 'Token', - required=True, - ) - apps_domain = fields.Char( - 'Apps Domain', - required=True, - ) - create_project = fields.Text( - 'Create Project' - ) - suspend_project = fields.Text( - 'Suspend Project' - ) - resume_project = fields.Text( - 'Resume Project' - ) - close_project = fields.Text( - 'Close Project' - ) + name = fields.Char("Name", required=True,) + api_url = fields.Char("API URL", required=True,) + token = fields.Char("Token", required=True,) + apps_domain = fields.Char("Apps Domain", required=True,) + create_project = fields.Text("Create Project") + suspend_project = fields.Text("Suspend Project") + resume_project = fields.Text("Resume Project") + close_project = fields.Text("Close Project") diff --git a/connector_openshift/views/backend_openshift_view.xml b/connector_openshift/views/backend_openshift_view.xml index dcbe81f..c5cddaf 100644 --- a/connector_openshift/views/backend_openshift_view.xml +++ b/connector_openshift/views/backend_openshift_view.xml @@ -1,18 +1,16 @@ - backend.openshift.tree backend.openshift - - - - + + + + - backend.openshift.form backend.openshift @@ -21,59 +19,58 @@

- +

- - - + + + - + - + - + - +
- backend.openshift.search backend.openshift - + - Openshift Backend backend.openshift ir.actions.act_window tree,form - - - - - + +
diff --git a/oca_dependencies.txt b/oca_dependencies.txt new file mode 100644 index 0000000..5428a2d --- /dev/null +++ b/oca_dependencies.txt @@ -0,0 +1 @@ +connector diff --git a/setup/.setuptools-odoo-make-default-ignore b/setup/.setuptools-odoo-make-default-ignore new file mode 100644 index 0000000..207e615 --- /dev/null +++ b/setup/.setuptools-odoo-make-default-ignore @@ -0,0 +1,2 @@ +# addons listed in this file are ignored by +# setuptools-odoo-make-default (one addon per line) diff --git a/setup/README b/setup/README new file mode 100644 index 0000000..a63d633 --- /dev/null +++ b/setup/README @@ -0,0 +1,2 @@ +To learn more about this directory, please visit +https://pypi.python.org/pypi/setuptools-odoo diff --git a/setup/connector_openshift/odoo/addons/connector_openshift b/setup/connector_openshift/odoo/addons/connector_openshift new file mode 120000 index 0000000..92491eb --- /dev/null +++ b/setup/connector_openshift/odoo/addons/connector_openshift @@ -0,0 +1 @@ +../../../../connector_openshift \ No newline at end of file diff --git a/setup/connector_openshift/setup.py b/setup/connector_openshift/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/connector_openshift/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) From 3d337edc5aae89698e60d14f16375cb67122dfc8 Mon Sep 17 00:00:00 2001 From: Murtuza Saleh Date: Tue, 11 Aug 2020 14:57:18 +0530 Subject: [PATCH 3/3] [IMP] Improved code --- connector_openshift/README.rst | 68 ++- connector_openshift/__manifest__.py | 3 +- connector_openshift/readme/CONTRIBUTORS.rst | 2 + connector_openshift/readme/DESCRIPTION.rst | 1 + connector_openshift/readme/INSTALL.rst | 1 + .../static/description/index.html | 427 ++++++++++++++++++ 6 files changed, 498 insertions(+), 4 deletions(-) create mode 100644 connector_openshift/readme/CONTRIBUTORS.rst create mode 100644 connector_openshift/readme/DESCRIPTION.rst create mode 100644 connector_openshift/readme/INSTALL.rst create mode 100644 connector_openshift/static/description/index.html diff --git a/connector_openshift/README.rst b/connector_openshift/README.rst index da68284..de28cbe 100644 --- a/connector_openshift/README.rst +++ b/connector_openshift/README.rst @@ -2,10 +2,47 @@ Openshift Connector =================== -Openshift Connector +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Finfrastructure-lightgray.png?logo=github + :target: https://github.com/OCA/infrastructure/tree/13.0/connector_openshift + :alt: OCA/infrastructure +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/infrastructure-13-0/infrastructure-13-0-connector_openshift + :alt: Translate me on Weblate + +|badge1| |badge2| |badge3| |badge4| + +Red Hat OpenShift Integrations with Odoo. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +Be sure to have the `oc `_ library. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. -Usage -===== +Do not contact contributors directly about support or help with technical issues. Credits ======= @@ -20,3 +57,28 @@ Contributors * Maxime Chambreuil * Serpent Consulting Services Pvt. Ltd. + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px + :target: https://github.com/max3903 + :alt: max3903 + +Current `maintainer `__: + +|maintainer-max3903| + +This module is part of the `OCA/infrastructure `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/connector_openshift/__manifest__.py b/connector_openshift/__manifest__.py index 7849e64..cfb1fe9 100644 --- a/connector_openshift/__manifest__.py +++ b/connector_openshift/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Openshift Connector", - "summary": """Openshift Connector""", + "summary": """Red Hat OpenShift Integrations with Odoo.""", "version": "13.0.1.0.0", "license": "AGPL-3", "author": "Odoo Community Association (OCA), Open Source Integrators", @@ -12,6 +12,7 @@ "category": "Tools", "depends": ["connector"], "data": ["security/ir.model.access.csv", "views/backend_openshift_view.xml"], + "external_dependencies": {"bin": ["oc"]}, "installable": True, "maintainers": ["max3903"], "development_status": "Beta", diff --git a/connector_openshift/readme/CONTRIBUTORS.rst b/connector_openshift/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..64881b4 --- /dev/null +++ b/connector_openshift/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Maxime Chambreuil +* Serpent Consulting Services Pvt. Ltd. diff --git a/connector_openshift/readme/DESCRIPTION.rst b/connector_openshift/readme/DESCRIPTION.rst new file mode 100644 index 0000000..1055998 --- /dev/null +++ b/connector_openshift/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +Red Hat OpenShift Integrations with Odoo. diff --git a/connector_openshift/readme/INSTALL.rst b/connector_openshift/readme/INSTALL.rst new file mode 100644 index 0000000..bc2bd80 --- /dev/null +++ b/connector_openshift/readme/INSTALL.rst @@ -0,0 +1 @@ +Be sure to have the `oc `_ library. diff --git a/connector_openshift/static/description/index.html b/connector_openshift/static/description/index.html new file mode 100644 index 0000000..ee52b25 --- /dev/null +++ b/connector_openshift/static/description/index.html @@ -0,0 +1,427 @@ + + + + + + +Openshift Connector + + + +
+

Openshift Connector

+ + +

Beta License: AGPL-3 OCA/infrastructure Translate me on Weblate

+

Red Hat OpenShift Integrations with Odoo.

+

Table of contents

+ +
+

Installation

+

Be sure to have the oc library.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Open Source Integrators
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

Current maintainer:

+

max3903

+

This module is part of the OCA/infrastructure project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ +