AETHER-3611 Change to Apache 2.0 license
Change-Id: I8dee9193783201ff9cb4c748a9a937f80b87c720
diff --git a/.gitreview b/.gitreview
index d1989d6..2f2e1dc 100644
--- a/.gitreview
+++ b/.gitreview
@@ -1,6 +1,6 @@
# SPDX-FileCopyrightText: 2020 Open Networking Foundation <info@opennetworking.org>
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
[gerrit]
host=gerrit.opencord.org
diff --git a/LICENSES/Apache-2.0.txt b/LICENSES/Apache-2.0.txt
new file mode 100644
index 0000000..f433b1a
--- /dev/null
+++ b/LICENSES/Apache-2.0.txt
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/LICENSES/LicenseRef-ONF-Member-Only-1.0.txt b/LICENSES/LicenseRef-ONF-Member-Only-1.0.txt
deleted file mode 100644
index bb813a1..0000000
--- a/LICENSES/LicenseRef-ONF-Member-Only-1.0.txt
+++ /dev/null
@@ -1,294 +0,0 @@
-ONF Member-Only Software License
-Version 1.0
-June 2020
-
-This ONF Member-Only Software License (this "License") is entered into by and
-between Open Networking Foundation ("ONF") and you and/or the entity on whose
-behalf you are accessing the Works (as defined in Section 1 below) ("you").
-This License forms a legally binding contract between you and ONF in relation
-to your access to and use of the Works. You may not access or use the Works if
-you do not accept this License.
-
-By accessing or using the Works, you hereby agree to the terms of this License.
-You may not use the Works and may not accept this License if you are a person
-barred from receiving the Works under the laws of the United States or other
-countries, including the country from which you access or use the Works. If you
-are agreeing to be bound by this License on behalf of your employer or other
-entity, you represent and warrant that you have full legal authority to bind
-your employer or such entity to this License. If you do not have the requisite
-authority, you may not accept this License or access or use the Works on behalf
-of your employer or any other entity. You and ONF acknowledge and agree as
-follows:
-
-1. DEFINITIONS.
-
-"Source" form shall mean the preferred form for making modifications, including
-but not limited to software source code, documentation source, and
-configuration files.
-
-"Object" form shall mean any form resulting from mechanical transformation or
-translation of a Source form, including but not limited to compiled object
-code, generated documentation, and conversions to other media types.
-
-"Works" shall mean the works of authorship, whether in Source or Object form,
-made available under this License, as indicated by a copyright notice/header
-file that is included in or attached to the Works.
-
-2. BACKGROUND.
-
-The purpose of this License is to provide ONF member companies in good standing
-("Members") with early access to software projects currently in development by
-ONF prior to their public release, to allow Members to review and test the
-Works internally for the purpose of making further contributions to the
-applicable project. Members who are Partner-level Members at the time they
-first access the Works are additionally permitted under this License to use the
-Works internally for the purpose of building and developing products and
-services for commercial purposes as defined in Section 4. However, this
-License does not permit any Member, regardless of Member level, to redistribute
-all or any portion of the Works, except as part of a contribution back to the
-applicable project, in accordance with Section 8 below, or in binary form as
-provided for Partner-level Members in Section 4 below. You understand and
-agree that ONF has the sole right to sublicense and distribute a public version
-of the final code base for the applicable project to third parties under the
-2.0 version of the Apache License, or other permissive license terms selected
-by ONF in its sole discretion.
-
-The Purpose of this License is to incubate the development of new software
-projects by providing a framework for ONF Members to access and contribute to
-the projects while minimizing the potential for forking or misuse of the
-projects. Nothing in this Background paragraph, however, shall require ONF to
-take any particular course of action regarding any Works covered by this
-License.
-
-3. LIMITED LICENSE TO ALL MEMBERS IN GOOD STANDING.
-
-Subject to your complete and ongoing compliance with all the terms and
-conditions set forth in this License, including without limitation all license
-limitations and restrictions set forth herein, ONF grants you the following
-limited, non-exclusive, non-transferable, non-sublicensable, revocable license
-to use, and (where applicable) authorize your employees and contractors
-performing work on your behalf (but only if such contractors are themselves
-Members of ONF and accept the terms of this License) to use the Works
-internally solely in connection with (a) reviewing, testing, modifying and
-creating derivatives of the Works for the sole purpose of making contributions
-by you to the code repository for the applicable project maintained by ONF; and
-(b) building, developing and testing your own applications or components that
-may interoperate with or incorporate the Works ("Applications") for the
-purposes of internal evaluation only.
-
-4. ADDITIONAL LICENSE TO PARTNER-LEVEL MEMBERS IN GOOD STANDING.
-
-Each project subject to this License shall be declared by ONF to be in one of
-two phases: a) Incubation Phase, or b) Partner Commercialization Phase. Each
-project shall start in the Incubation Phase, and ONF, at its sole discretion,
-shall determine when each project moves into the Partner Commercialization
-Phase. Each project shall be documented to be in one of these two phases in
-the Project's README documentation and can be confirmed by contacting ONF.
-
-Once any project moves into the Partner Commercialization Phase, if you are a
-Partner-level ONF Member in good standing at the time you first access the
-Works and for the entire period during which you access and use the Works, in
-addition to the rights granted in Section 3, and subject to your complete and
-ongoing compliance with all the terms and conditions set forth in this License,
-including without limitation all license limitations and restrictions set forth
-herein, ONF grants you the limited, non-exclusive, non-transferable,
-non-sublicensable, revocable license to use, and (where applicable) authorize
-your employees and contractors performing work on your behalf (but only if such
-contractors are themselves Members of ONF and accept the terms of this License)
-to use, test, modify and create derivatives of the Works internally for the
-purpose of building, developing, testing, marketing, offering for sale and
-selling commercial products and services to third parties. Wherever possible,
-you will take reasonable precautions to ensure Works remain accessible only to
-ONF Members, and any commercial product or service requiring redistribution of
-the Works, of modifications of the Works or of derivatives of the Works must be
-made solely in binary machine code form where possible to further this aim.
-
-Partners-level Members gaining additional insights as a result of accessing and
-using the Works for commercial products and services are expected to provide
-feedback to and to make contributions to the project for the benefit of both
-the project and the general membership.
-
-You may verify your company's Partner-level membership status on the ONF
-website at: https://www.opennetworking.org/member-listing/.
-
-4.1 GRACE PERIOD FOR NON-PARTNER-LEVEL MEMBERS
-
-If you are not a Partner-level Member and you wish to benefit from the rights
-granted to ONF Partners in Section 4, you have a 90-day grace period from the
-day you first access the Works to upgrade to a Partner-Level ONF Membership.
-Should you upgrade within this grace period, you will be recognized as if you
-had been a Partner on the day you first accessed the Works for the purpose of
-interpreting your rights under Section 4.
-
-5. RESTRICTIONS.
-
-By accessing or using the Works, you represent, warrant, and covenant that you
-and/or the entity on whose behalf you are accessing the Works is a Member in
-good standing of ONF.
-
-You acknowledge that, except for the limited rights expressly set forth above,
-the foregoing licenses do not include any right to, and you agree not to (i)
-redistribute, sell, lease, license, modify or otherwise create any derivative
-works of any portion of the Works, or (ii) distribute, deploy, or otherwise
-utilize the Works or Applications for any public, production, commercial, or
-other similar purpose other than internal use for evaluation and development of
-contributions to the code repository for the applicable project maintained by
-ONF and non-public, experimental Applications.
-
-Except as expressly provided herein, you may not (w) reproduce, distribute,
-publicly display, or publicly perform any part of the Works, (x) decompile,
-reverse engineer, or otherwise access or attempt to access source code not made
-available to you in source code form, (y) make or attempt to make any
-modification to, or otherwise create any derivative works of, the Works; or (z)
-remove, obscure, interfere with or circumvent any feature of the Works,
-including without limitation any copyright or other intellectual property
-notices, security, or access control mechanism. You agree that you will not use
-the Works to do anything illegal, including facilitating, promoting, or
-otherwise encouraging any illegal activities.
-
-You represent and warrant that the Works will not be shipped, transferred or
-exported into any country or used in any manner prohibited by the United States
-Export Administration Act or any other export laws, restrictions or regulations
-(collectively the "Export Laws"). In addition, if the Works are identified as
-an export controlled item under the Export Laws, you represent and warrant that
-you are not a citizen, or otherwise located within, an embargoed nation
-(including without limitation Crimea, Cuba, Iran, North Korea, Sudan, or Syria)
-and that you are not otherwise prohibited under the Export Laws from receiving
-the Works.
-
-ANY USE IN VIOLATION OF THE FOREGOING LIMITATIONS AND RESTRICTIONS IS STRICTLY
-PROHIBITED, AND UNLICENSED.
-
-6. RESERVATION OF RIGHTS.
-
-The Works are owned by ONF and/or its licensors, and are licensed, not sold, to
-you. The Works are protected by copyright, trade dress, patent, and trademark
-laws of the United States and other jurisdictions, international conventions,
-and all other relevant intellectual property and proprietary rights, and
-applicable laws (collectively, the "Intellectual Property Rights"). You agree
-that ONF or its subsidiaries or affiliated companies and/or its licensors own
-all legal right, title and interest in and to the Works, including any and all
-Intellectual Property Rights. ONF reserves all rights not expressly granted in
-this License. You do not acquire any right, title or interest to the Works,
-whether by implication, estoppel, or otherwise, except for the limited rights
-set forth in this License.
-
-You agree that the form and nature of the Works that ONF provides may change
-without prior notice to you and that future versions of the Works may be
-incompatible with applications developed using previous versions of the Works.
-You agree that ONF may stop (permanently or temporarily) providing the Works
-(or any features within the Works) to you or to users generally at ONF's sole
-discretion, without prior notice to you. Nothing in this License gives you a
-right to use any of ONF's trade names, trademarks, service marks, logos, domain
-names, or other distinctive brand features.
-
-7. PURPOSE AND USE.
-
-You agree that you will not engage in any activity with the Works, including
-the development or distribution of an Application that interferes with,
-disrupts, damages, or accesses in an unauthorized manner the servers, networks,
-or other properties or services of any third party. You agree that you are
-solely responsible for (and that ONF has no responsibility to you or to any
-third party for) any data, content, or resources that you create, transmit or
-display. You agree that you are solely responsible for (and that ONF has no
-responsibility to you or to any third party for) any breach of your obligations
-under this License, any applicable third party contract or terms of service, or
-any applicable law or regulation, and for the consequences (including any loss
-or damage which ONF or any third party may suffer) of any such breach.
-
-8. FEEDBACK; CONTRIBUTIONS.
-
-If you provide ONF with any comments, bug reports, feedback, enhancements, or
-modifications proposed or suggested by you for the Works ("Feedback"), such
-Feedback will be submitted as a Contribution to the applicable project
-maintained by ONF under the terms and conditions of a Contributor License
-Agreement between you and ONF, is provided on a non-confidential basis
-(notwithstanding any notice to the contrary you may include in any accompanying
-communication), and ONF shall have the right to use such Feedback at its
-discretion, including, but not limited to the incorporation of such Feedback
-into the Works and any final code base that may be derived from the Works.
-
-9. TERMINATION OF THIS LICENSE.
-
-This License will continue to apply until terminated by either you or ONF as
-set out below. If you want to terminate this License, you may do so by ceasing
-your use of the Works. If you cease being a Member in good standing of ONF,
-this License will terminate automatically and without further notice to you.
-ONF may at any time terminate this License: (a) if you have breached any
-provision of this License; or (b) at ONF's convenience. When this License
-comes to an end, except as otherwise set forth in this paragraph 9, all of the
-legal rights, obligations and liabilities that you and ONF have benefited from,
-been subject to (or which have accrued over time while this License has been in
-force) or which are expressed to continue indefinitely, shall be unaffected by
-this cessation, and paragraphs 1, 2 and 5 through 14 shall continue to apply to
-such rights, obligations and liabilities indefinitely. In addition, unless
-this License is terminated by ONF as a result of your breach of any provision
-of this License, Partner-level Members entitled to the benefits of Section 4 of
-this License shall also retain all rights granted by Section 4 so as long as
-you remain a Partner-level Member in good standing.
-
-10. DISCLAIMER OF WARRANTIES.
-
-YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE WORKS IS AT YOUR SOLE
-RISK AND THAT THE WORKS ARE PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT
-WARRANTY OF ANY KIND FROM ONF. YOUR USE OF THE WORKS IS AT YOUR OWN DISCRETION
-AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM
-OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE. ONF FURTHER
-EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. ONF
-EXPRESSLY DISCLAIMS ANY WARRANTIES OF ANY KIND WITH RESPECT TO THE ACCURACY OR
-FUNCTIONALITY OF THE WORKS, AND WITH RESPECT TO THE ACCURACY, VALIDITY, OR
-COMPLETENESS OF ANY INFORMATION OR FEATURES AVAILABLE THROUGH THE WORKS, OR THE
-QUALITY OR CONSISTENCY OF THE WORKS OR RESULTS OBTAINED THROUGH THEIR USE.
-
-11. LIMITATION OF LIABILITY.
-
-YOU EXPRESSLY UNDERSTAND AND AGREE THAT ONF, ITS SUBSIDIARIES AND AFFILIATES,
-AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES
-THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT ONF OR
-ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE
-POSSIBILITY OF ANY SUCH LOSSES. IN NO EVENT WILL ONF'S AGGREGATE LIABILITY FOR
-DAMAGES ARISING OUT OF THIS LICENSE OR YOUR USE OF THE WORKS EXCEED THE GREATER
-OF AMOUNTS PAID BY YOU FOR THE WORKS, IF ANY.
-
-12. INDEMNIFICATION.
-
-To the maximum extent permitted by law, you agree to defend, indemnify and hold
-harmless ONF, its affiliates and their respective directors, officers,
-employees and agents from and against any and all claims, actions, suits or
-proceedings, as well as any and all losses, liabilities, damages, costs and
-expenses (including reasonable attorneys' fees) arising out of or accruing from
-(a) your use of the Works, (b) any Application or (for Partner-level Members)
-commercial product or service you develop using the Works that infringes any
-copyright, trademark, trade secret, trade dress, patent or other intellectual
-property right of any person, and (c) any non-compliance by you with this
-License or any applicable law or regulation.
-
-13. CHANGES TO THIS LICENSE.
-
-ONF may make changes to this License as it distributes new versions of the
-Works. When these changes are made, ONF will make a new version of this License
-available on the ONF website.
-
-14. MISCELLANEOUS TERMS.
-
-This License constitutes the entire legal agreement between you and ONF with
-regard to your access and use of the Works, and governs your access and use of
-the Works and completely supersedes any prior agreements between you and ONF in
-relation to the Works, except for any Contributor License Agreement you may
-have executed with ONF. You agree that if ONF does not exercise or enforce any
-legal right or remedy which is contained in this License (or which ONF has the
-benefit of under any applicable law), this will not be taken to be a formal
-waiver of ONF's rights and that those rights or remedies will still be
-available to ONF. If any court of law, having the jurisdiction to decide on
-this matter, rules that any provision of this License is invalid, then that
-provision will be removed from this License without affecting the rest of this
-License. The remaining provisions of this License will continue to be valid and
-enforceable so long as this License, as so modified, does not substantially
-impair the respective expectations or reciprocal obligations of the parties.
-The rights granted in this License may not be assigned or transferred by you
-without the prior written approval of ONF. You shall not be permitted to
-delegate your responsibilities or obligations under this License without the
-prior written approval of ONF.
diff --git a/Makefile b/Makefile
index 0cf9df5..6edc3f5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
# SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
.DEFAULT:
make -C edge-monitoring-server $@
diff --git a/VERSION b/VERSION
index 8bf8ecb..03b4352 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.7.18
+0.7.19
diff --git a/VERSION.license b/VERSION.license
index 7dc5f1a..eca00b2 100644
--- a/VERSION.license
+++ b/VERSION.license
@@ -1,3 +1,3 @@
SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
-SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
\ No newline at end of file
+SPDX-License-Identifier: Apache-2.0
\ No newline at end of file
diff --git a/aether-alerting-devices/aether-monitoring-lamp/aml_production_config.json.license b/aether-alerting-devices/aether-monitoring-lamp/aml_production_config.json.license
index 7dc5f1a..eca00b2 100644
--- a/aether-alerting-devices/aether-monitoring-lamp/aml_production_config.json.license
+++ b/aether-alerting-devices/aether-monitoring-lamp/aml_production_config.json.license
@@ -1,3 +1,3 @@
SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
-SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
\ No newline at end of file
+SPDX-License-Identifier: Apache-2.0
\ No newline at end of file
diff --git a/aether-alerting-devices/aether-monitoring-lamp/aml_staging_config.json.license b/aether-alerting-devices/aether-monitoring-lamp/aml_staging_config.json.license
index 5310a69..91f5d70 100644
--- a/aether-alerting-devices/aether-monitoring-lamp/aml_staging_config.json.license
+++ b/aether-alerting-devices/aether-monitoring-lamp/aml_staging_config.json.license
@@ -1,2 +1,2 @@
SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
-SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+SPDX-License-Identifier: Apache-2.0
diff --git a/aether-alerting-devices/aether-monitoring-lamp/run_aml.py b/aether-alerting-devices/aether-monitoring-lamp/run_aml.py
index 780d792..7836f03 100644
--- a/aether-alerting-devices/aether-monitoring-lamp/run_aml.py
+++ b/aether-alerting-devices/aether-monitoring-lamp/run_aml.py
@@ -1,6 +1,6 @@
# SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
import json
import urllib.request
diff --git a/edge-monitoring-server/.gitignore b/edge-monitoring-server/.gitignore
index c39a109..725fa47 100644
--- a/edge-monitoring-server/.gitignore
+++ b/edge-monitoring-server/.gitignore
@@ -1,6 +1,6 @@
# Copyright 2020-present Open Networking Foundation
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
*.pyc
__pycache__/
diff --git a/edge-monitoring-server/Dockerfile.server b/edge-monitoring-server/Dockerfile.server
index 788bca7..46270e9 100644
--- a/edge-monitoring-server/Dockerfile.server
+++ b/edge-monitoring-server/Dockerfile.server
@@ -1,6 +1,6 @@
# Copyright 2020-present Open Networking Foundation
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
FROM python:3.7
diff --git a/edge-monitoring-server/Makefile b/edge-monitoring-server/Makefile
index dee8688..7417cc4 100644
--- a/edge-monitoring-server/Makefile
+++ b/edge-monitoring-server/Makefile
@@ -1,6 +1,6 @@
# Copyright 2020-present Open Networking Foundation
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
# Secret iCal URL for ACE downtime calendar
SECRET_ICAL_URL ?=
diff --git a/edge-monitoring-server/edge_maintenance_agent.py b/edge-monitoring-server/edge_maintenance_agent.py
index 68f06c4..52eee93 100755
--- a/edge-monitoring-server/edge_maintenance_agent.py
+++ b/edge-monitoring-server/edge_maintenance_agent.py
@@ -2,7 +2,7 @@
# Copyright 2021-present Open Networking Foundation
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
# This implements a simple agent that polls the central Edge Monitoring Server
# to find out whether the local cluster is in a maintenance window, and exports
diff --git a/edge-monitoring-server/edge_monitoring_server.py b/edge-monitoring-server/edge_monitoring_server.py
index 7d46990..66e656f 100755
--- a/edge-monitoring-server/edge_monitoring_server.py
+++ b/edge-monitoring-server/edge_monitoring_server.py
@@ -2,7 +2,7 @@
# Copyright 2020-present Open Networking Foundation
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
import os
import time
diff --git a/edge-monitoring-server/requirements.txt b/edge-monitoring-server/requirements.txt
index 787e399..93fb289 100644
--- a/edge-monitoring-server/requirements.txt
+++ b/edge-monitoring-server/requirements.txt
@@ -1,6 +1,6 @@
# SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
flask
prometheus-client
diff --git a/edge-monitoring-server/test_edge_monitoring_server.py b/edge-monitoring-server/test_edge_monitoring_server.py
index 4999377..f5e86ef 100755
--- a/edge-monitoring-server/test_edge_monitoring_server.py
+++ b/edge-monitoring-server/test_edge_monitoring_server.py
@@ -2,7 +2,7 @@
# Copyright 2020-present Open Networking Foundation
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
import unittest
import edge_monitoring_server as ems
diff --git a/edge-monitoring/.gitignore b/edge-monitoring/.gitignore
index c39a109..725fa47 100644
--- a/edge-monitoring/.gitignore
+++ b/edge-monitoring/.gitignore
@@ -1,6 +1,6 @@
# Copyright 2020-present Open Networking Foundation
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
*.pyc
__pycache__/
diff --git a/edge-monitoring/agent_adb/config.json.license b/edge-monitoring/agent_adb/config.json.license
index 7dc5f1a..eca00b2 100644
--- a/edge-monitoring/agent_adb/config.json.license
+++ b/edge-monitoring/agent_adb/config.json.license
@@ -1,3 +1,3 @@
SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
-SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
\ No newline at end of file
+SPDX-License-Identifier: Apache-2.0
\ No newline at end of file
diff --git a/edge-monitoring/agent_adb/edge-mon-agent.service.license b/edge-monitoring/agent_adb/edge-mon-agent.service.license
index 7dc5f1a..eca00b2 100644
--- a/edge-monitoring/agent_adb/edge-mon-agent.service.license
+++ b/edge-monitoring/agent_adb/edge-mon-agent.service.license
@@ -1,3 +1,3 @@
SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
-SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
\ No newline at end of file
+SPDX-License-Identifier: Apache-2.0
\ No newline at end of file
diff --git a/edge-monitoring/agent_adb/edge_monitoring_agent_adb.py b/edge-monitoring/agent_adb/edge_monitoring_agent_adb.py
index efbfca8..757db8b 100755
--- a/edge-monitoring/agent_adb/edge_monitoring_agent_adb.py
+++ b/edge-monitoring/agent_adb/edge_monitoring_agent_adb.py
@@ -2,7 +2,7 @@
# Copyright 2020-present Open Networking Foundation
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
import sys
import os
diff --git a/edge-monitoring/agent_adb/requirements.txt b/edge-monitoring/agent_adb/requirements.txt
index 680f59b..64021cd 100644
--- a/edge-monitoring/agent_adb/requirements.txt
+++ b/edge-monitoring/agent_adb/requirements.txt
@@ -1,6 +1,6 @@
# SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
requests
git+git://github.com/sch3m4/pyadb@master#egg=pyadb
diff --git a/edge-monitoring/agent_modem/config.json.license b/edge-monitoring/agent_modem/config.json.license
index 7dc5f1a..eca00b2 100644
--- a/edge-monitoring/agent_modem/config.json.license
+++ b/edge-monitoring/agent_modem/config.json.license
@@ -1,3 +1,3 @@
SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
-SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
\ No newline at end of file
+SPDX-License-Identifier: Apache-2.0
\ No newline at end of file
diff --git a/edge-monitoring/agent_modem/edge-mon-agent.service.license b/edge-monitoring/agent_modem/edge-mon-agent.service.license
index 7dc5f1a..eca00b2 100644
--- a/edge-monitoring/agent_modem/edge-mon-agent.service.license
+++ b/edge-monitoring/agent_modem/edge-mon-agent.service.license
@@ -1,3 +1,3 @@
SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
-SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
\ No newline at end of file
+SPDX-License-Identifier: Apache-2.0
\ No newline at end of file
diff --git a/edge-monitoring/agent_modem/edge_monitoring_agent_modem.py b/edge-monitoring/agent_modem/edge_monitoring_agent_modem.py
index d377d69..8354e53 100755
--- a/edge-monitoring/agent_modem/edge_monitoring_agent_modem.py
+++ b/edge-monitoring/agent_modem/edge_monitoring_agent_modem.py
@@ -2,7 +2,7 @@
# Copyright 2020-present Open Networking Foundation
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
import sys
import os
diff --git a/edge-monitoring/agent_modem/requirements.txt b/edge-monitoring/agent_modem/requirements.txt
index b058718..c2301b6 100644
--- a/edge-monitoring/agent_modem/requirements.txt
+++ b/edge-monitoring/agent_modem/requirements.txt
@@ -1,6 +1,6 @@
# SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
+# SPDX-License-Identifier: Apache-2.0
requests
pyserial
diff --git a/slack-notifier/aether_status_notifier.py b/slack-notifier/aether_status_notifier.py
deleted file mode 100644
index 9048349..0000000
--- a/slack-notifier/aether_status_notifier.py
+++ /dev/null
@@ -1,230 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright 2020-present Open Networking Foundation
-#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
-
-import sys
-import os
-import json
-import enum
-import time
-import datetime
-import requests
-from pytz import timezone
-from datetime import date
-from collections import namedtuple
-from rancher import Client as RancherClient
-from slack import WebClient as SlackClient
-from slack.errors import SlackApiError
-
-
-class Status(enum.Enum):
- healthy = 1
- unhealthy = 2
- error = 3 # check failed
- unavailable = 4 # check not automated
-
-
-CONF = json.loads(
- open(os.getenv('CONFIG_FILE', "./config.json")).read(),
- object_hook=lambda d: namedtuple('X', d.keys())(*d.values())
-)
-
-EMOJI = {
- Status.healthy: CONF.slack.emoji.healthy,
- Status.unhealthy: CONF.slack.emoji.unhealthy,
- Status.error: CONF.slack.emoji.error,
- Status.unavailable: CONF.slack.emoji.unavailable
-}
-
-HEALTHY_STATES = ["active", "connected"]
-
-REPORT_HEADER = '''\
-*******************************************************************************
-'''
-REPORT_HEADER += CONF.slack.report_header
-REPORT_HEADER += date.today().strftime(" %d/%m/%Y\n")
-REPORT_HEADER += EMOJI[Status.healthy] + " Healthy "
-REPORT_HEADER += EMOJI[Status.unhealthy] + " Unhealthy "
-REPORT_HEADER += EMOJI[Status.error] + " Checks failed "
-REPORT_HEADER += EMOJI[Status.unavailable] + " Checks not automated\n"
-REPORT_HEADER += '''\
-*******************************************************************************
-'''
-
-MSG_PREFIX_BLANK = " :warning-sign: "
-MSG_PREFIX_ERROR = " [ERROR]: "
-
-
-def _get_status(state_string):
- if state_string in HEALTHY_STATES:
- return Status.healthy
- else:
- return Status.unhealthy
-
-
-def _get_report(name, status, msg=[]):
- report = []
- if not status:
- return []
- report += [EMOJI[status] + " " + name]
- msg_prefix = MSG_PREFIX_ERROR if status == Status.error else MSG_PREFIX_BLANK
- for m in msg:
- report += [msg_prefix + m]
- return report
-
-
-def _run_adb_command(adb_path, ssh_client, command):
- final_command = adb_path + " shell " + command
- stdin, stdout, stderr = ssh_client.exec_command(final_command)
- error = stderr.read().decode("ascii").strip("\n")
- if "Error" in error:
- msg = "failed to run command: " + final_command
- return False, msg
- output = stdout.read().decode("ascii").strip("\n")
- time.sleep(2)
- return True, output
-
-
-def get_project_status(cluster, project):
- status = ""
- msg = []
-
- projects = cluster.projects(name=project.name)
- check_type = project.check_type
- unhealthy = []
- for p in projects:
- targets = p.apps() if check_type == "app" else p.workloads()
- for target in targets.data:
- status = _get_status(target.state)
- if status == Status.unhealthy:
- warning = check_type + " " + target.name + " is unhealthy"
- unhealthy += [warning]
- if status == Status.unhealthy:
- msg += unhealthy
-
- return status, msg
-
-
-def get_aether_network_status(edge_name):
- status = ""
- msg = []
-
- try:
- req_url = CONF.edge_monitoring.api_url + "/" + edge_name
- response = requests.get(req_url)
-
- if response.status_code == 404:
- return Status.unavailable, []
- response.raise_for_status()
- except Exception as e:
- return Status.error, str(e)
-
- json_resp = json.loads(response.text)['edge']
-
- last_update = datetime.datetime.fromtimestamp(json_resp['last_update'])
- time_diff = datetime.datetime.now() - last_update
- time_diff_mins = int(round(time_diff.total_seconds() / 60))
- if time_diff_mins > 10:
- msg += ['status report not received for ' + str(time_diff_mins) + 'min']
- return Status.error, msg
-
- status = Status.healthy
-
- cp_status = _get_status(json_resp['status']['control_plane'])
- if cp_status is not Status.healthy:
- status = Status.unhealthy
- msg += ["control plane is not healthy"]
-
- up_status = _get_status(json_resp['status']['user_plane'])
- if up_status is not Status.healthy:
- status = Status.unhealthy
- msg += ["user plane is not healthy"]
-
- return status, msg
-
-
-def get_k8s_status(cluster):
- status = ""
- msg = []
-
- status = _get_status(cluster.state)
- if cluster.state == "unavailable" or status is Status.unhealthy:
- msg += [cluster.transitioningMessage]
- return Status.error, msg
-
- for component in cluster.componentStatuses:
- for condition in component.conditions:
- if condition.status != "True":
- msg += [component.name + " is unhealthy"]
- for node in cluster.nodes():
- if _get_status(node.state) != Status.healthy:
- msg += [node.hostname + " is unhealthy"]
-
- return status, msg
-
-
-def get_cluster_health_report(cluster, edge=False):
- status = ""
- msg = []
- report = ["*[" + cluster.name + "]*"]
-
- # Check K8S API health
- k8s_status, msg = get_k8s_status(cluster)
- report += _get_report("Kubernetes", k8s_status, msg)
-
- # Check managed project health
- for project in CONF.managed_projects:
- status = ""
- msg = []
- if k8s_status == Status.healthy:
- status, msg = get_project_status(cluster, project)
- else:
- status = Status.error
- report += _get_report(project.display, status, msg)
-
- # Check Aether network health for Edges
- # TODO: separate report for control plane and user plane
- if edge:
- status, msg = get_aether_network_status(cluster.name)
- report += _get_report("Aether Network", status, msg)
-
- report_string = "\n".join(report)
- return report_string
-
-
-def main():
- report = REPORT_HEADER
-
- # Get cluster status from Rancher
- try:
- rancher_client = RancherClient(
- url=CONF.rancher.api_url, access_key=CONF.rancher.access_key,
- secret_key=CONF.rancher.secret_key)
- response = rancher_client.list_cluster()
- except Exception as e:
- report += _get_report("Rancher", Status.error, [str(e)])
- response = namedtuple('X', "data")([])
-
- # Check cluster health and make a report
- for cluster in response.data:
- if "production" in cluster.name:
- edge = True if "edge" in cluster.name else False
- report += get_cluster_health_report(cluster, edge)
- report += "\n\n"
-
- # Publish the report to Slack channel
- try:
- slack_client = SlackClient(token=CONF.slack.api_token)
- response = slack_client.chat_postMessage(
- channel=CONF.slack.channel,
- text=report)
- except SlackApiError as e:
- assert e.response["ok"] is False
- assert e.response["error"]
- print(f"Got an error: {e.response['error']}")
-
-
-if __name__ == "__main__":
- main()
diff --git a/slack-notifier/config.json b/slack-notifier/config.json
deleted file mode 100644
index c19c338..0000000
--- a/slack-notifier/config.json
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "rancher": {
- "api_url": "https://aether.onlab.us/v3",
- "access_key": "token-ctvfp",
- "secret_key": "4wkn4n6jdvbg2g2tddmjpvb7tdhw5dbsbqkhzj5fkjv9nl8bpvl972"
- },
- "edge_monitoring": {
- "api_url": "https://aether.onlab.us/edges"
- },
- "slack": {
- "api_token": "xoxb-195991835223-1111472166775-NDjfMUTM93LZ4KvcF3yoLGdy",
- "channel": "#aether-status",
- "emoji": {
- "healthy": ":green_circle:",
- "unhealthy": ":red_circle:",
- "error": ":yellow_circle:",
- "unavailable": ":white_circle:"
- },
- "report_header": "Aether Daily Status Report"
- },
- "managed_projects": [
- {
- "name": "System",
- "check_type": "pod",
- "display": "Kubernetes System Pods"
- },
- {
- "name": "ConnectivityService",
- "check_type": "app",
- "display": "Connectivity Service Apps"
- },
- {
- "name": "CordPlatform",
- "check_type": "app",
- "display": "Monitoring Service Apps"
- }
- ]
-}
diff --git a/slack-notifier/config.json.license b/slack-notifier/config.json.license
deleted file mode 100644
index 7dc5f1a..0000000
--- a/slack-notifier/config.json.license
+++ /dev/null
@@ -1,3 +0,0 @@
-SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
-
-SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
\ No newline at end of file
diff --git a/slack-notifier/requirements.txt b/slack-notifier/requirements.txt
deleted file mode 100644
index b15f483..0000000
--- a/slack-notifier/requirements.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-FileCopyrightText: 2021 Open Networking Foundation <info@opennetworking.org>
-#
-# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
-
-slackclient
-requests
-git+git://github.com/rancher/client-python@master#egg=client-python
-pytz