AETHER-3162 Remove magma leftover iptables rule from enodebd

AETHER-3198 Add REUSE compliant to enodebd
AETHER-3196 Support identify IP from X-Real IP in enodebd
AETHER-3229 Documentation of configuration and state machine for enodebd
AETHER-3292 Adding new parameter to support in enodebd Sercomm driver
AETHER-3311 Remove unused protobuf definition from enodebd

Change-Id: Ie69f0141eff70cb3d4447cd9575c8224d42dd5e3
diff --git a/state_machines/acs_state_utils.py b/state_machines/acs_state_utils.py
index e0e32cc..e35f37d 100644
--- a/state_machines/acs_state_utils.py
+++ b/state_machines/acs_state_utils.py
@@ -1,15 +1,7 @@
-"""
-Copyright 2020 The Magma Authors.
-
-This source code is licensed under the BSD-style license found in the
-LICENSE file in the root directory of this source tree.
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
+# SPDX-FileCopyrightText: 2020 The Magma Authors.
+# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
+#
+# SPDX-License-Identifier: BSD-3-Clause
 
 from typing import Any, Dict, List, Optional
 
diff --git a/state_machines/enb_acs.py b/state_machines/enb_acs.py
index 24e24e7..ecaff6f 100644
--- a/state_machines/enb_acs.py
+++ b/state_machines/enb_acs.py
@@ -1,15 +1,8 @@
-"""
-Copyright 2020 The Magma Authors.
+# SPDX-FileCopyrightText: 2020 The Magma Authors.
+# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
+#
+# SPDX-License-Identifier: BSD-3-Clause
 
-This source code is licensed under the BSD-style license found in the
-LICENSE file in the root directory of this source tree.
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
 from abc import ABC, abstractmethod
 from asyncio import BaseEventLoop
 from time import time
diff --git a/state_machines/enb_acs_impl.py b/state_machines/enb_acs_impl.py
index 4a197d4..0bb1a96 100644
--- a/state_machines/enb_acs_impl.py
+++ b/state_machines/enb_acs_impl.py
@@ -1,15 +1,7 @@
-"""
-Copyright 2020 The Magma Authors.
-
-This source code is licensed under the BSD-style license found in the
-LICENSE file in the root directory of this source tree.
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
+# SPDX-FileCopyrightText: 2020 The Magma Authors.
+# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
+#
+# SPDX-License-Identifier: BSD-3-Clause
 
 import traceback
 from abc import abstractmethod
diff --git a/state_machines/enb_acs_manager.py b/state_machines/enb_acs_manager.py
index 7ad6b02..d8b5947 100644
--- a/state_machines/enb_acs_manager.py
+++ b/state_machines/enb_acs_manager.py
@@ -1,15 +1,7 @@
-"""
-Copyright 2020 The Magma Authors.
-
-This source code is licensed under the BSD-style license found in the
-LICENSE file in the root directory of this source tree.
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
+# SPDX-FileCopyrightText: 2020 The Magma Authors.
+# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
+#
+# SPDX-License-Identifier: BSD-3-Clause
 
 from typing import Any, List, Optional
 
@@ -62,6 +54,7 @@
                 return models.DummyInput()
 
         handler = self._get_handler(client_ip)
+
         if handler is None:
             logger.warning(
                 'Received non-Inform TR-069 message from unknown '
@@ -195,7 +188,12 @@
 
     @staticmethod
     def _get_client_ip(ctx: WsgiMethodContext) -> str:
-        return ctx.transport.req_env.get("REMOTE_ADDR", "unknown")
+
+        client_ip = ctx.transport.req_env.get("HTTP_X_REAL_IP", 
+            ctx.transport.req_env.get("REMOTE_ADDR", "unknown")
+        )
+
+        return client_ip
 
     def _build_handler(
         self,
diff --git a/state_machines/enb_acs_pointer.py b/state_machines/enb_acs_pointer.py
index 3ec19a7..ea0f5bf 100644
--- a/state_machines/enb_acs_pointer.py
+++ b/state_machines/enb_acs_pointer.py
@@ -1,15 +1,7 @@
-"""
-Copyright 2020 The Magma Authors.
-
-This source code is licensed under the BSD-style license found in the
-LICENSE file in the root directory of this source tree.
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
+# SPDX-FileCopyrightText: 2020 The Magma Authors.
+# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
+#
+# SPDX-License-Identifier: BSD-3-Clause
 
 from state_machines.enb_acs import EnodebAcsStateMachine
 
diff --git a/state_machines/enb_acs_states.py b/state_machines/enb_acs_states.py
index d9e2ed9..bfd0824 100644
--- a/state_machines/enb_acs_states.py
+++ b/state_machines/enb_acs_states.py
@@ -1,15 +1,7 @@
-"""
-Copyright 2020 The Magma Authors.
-
-This source code is licensed under the BSD-style license found in the
-LICENSE file in the root directory of this source tree.
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
+# SPDX-FileCopyrightText: 2020 The Magma Authors.
+# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
+#
+# SPDX-License-Identifier: BSD-3-Clause
 
 import time
 from abc import ABC, abstractmethod
@@ -1288,7 +1280,7 @@
         request = models.Download()
         request.CommandKey = "20220206215200"
         request.FileType = "1 Firmware Upgrade Image"
-        request.URL = "http://18.116.99.179/firmware/Qproject_TEST3918_2102241222.ffw"
+        request.URL = "http://10.128.250.131/firmware/Qproject_TEST3918_2102241222.ffw"
         request.Username = ""
         request.Password = ""
         request.FileSize = 57208579
diff --git a/state_machines/timer.py b/state_machines/timer.py
index 09f6b68..03f0e05 100644
--- a/state_machines/timer.py
+++ b/state_machines/timer.py
@@ -1,15 +1,7 @@
-"""
-Copyright 2020 The Magma Authors.
-
-This source code is licensed under the BSD-style license found in the
-LICENSE file in the root directory of this source tree.
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-"""
+# SPDX-FileCopyrightText: 2020 The Magma Authors.
+# SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org>
+#
+# SPDX-License-Identifier: BSD-3-Clause
 
 from datetime import datetime, timedelta