diff --git a/playbooks/scenarios/full/packet-flood.yml b/playbooks/scenarios/full/packet-flood.yml
index ab87387..29ea56e 100644
--- a/playbooks/scenarios/full/packet-flood.yml
+++ b/playbooks/scenarios/full/packet-flood.yml
@@ -41,8 +41,7 @@
     send_loops: 2
     send_loop_delay: 5
     cleanup_rest_call:
-      url: "http://{{ sdn_ip }}:{{ sdn_port }}/stopAttack"
-      method: POST
+      url: "http://{{ sdn_ip }}:{{ sdn_port }}/gwAttack"
       body:
         src_ip: "{% if scenario_send_ip_version|int == 4 %}{{ sender.ip }}{% else %}{{ sender.ipv6 }}{% endif %}"
         packet_size: 112
@@ -80,8 +79,7 @@
     send_loops: 2
     send_loop_delay: 5
     cleanup_rest_call:
-      url: "http://{{ sdn_ip }}:{{ sdn_port }}/stopAttack"
-      method: POST
+      url: "http://{{ sdn_ip }}:{{ sdn_port }}/gwAttack"
       body:
         src_ip: "{% if scenario_send_ip_version|int == 4 %}{{ sender.ip }}{% else %}{{ sender.ipv6 }}{% endif %}"
         packet_size: 112
@@ -119,8 +117,7 @@
     send_loops: 2
     send_loop_delay: 5
     cleanup_rest_call:
-      url: "http://{{ sdn_ip }}:{{ sdn_port }}/stopAttack"
-      method: POST
+      url: "http://{{ sdn_ip }}:{{ sdn_port }}/gwAttack"
       body:
         src_ip: "{% if scenario_send_ip_version|int == 4 %}{{ sender.ip }}{% else %}{{ sender.ipv6 }}{% endif %}"
         packet_size: 112
diff --git a/playbooks/scenarios/gateway/data-drop.yml b/playbooks/scenarios/gateway/data-drop.yml
index d162a59..81197ac 100644
--- a/playbooks/scenarios/gateway/data-drop.yml
+++ b/playbooks/scenarios/gateway/data-drop.yml
@@ -30,20 +30,13 @@
     send_sw_port: "{{ topo_dict.links[0].south_facing_port }}"
     receiver: "{{ topo_dict.hosts[remote_rec_host] }}"
     rec_sw_port: "{{ topo_dict.links[1].north_facing_port }}"
-    attack_body:
-      src_ip: "{% if scenario_send_ip_version|int == 4 %}{{ sender.ip }}{% else %}{{ sender.ipv6 }}{% endif %}"
-      packet_size: 112
-      attack_type: "UDP Flood"
-      dst_port: "{{ send_port }}"
-      dst_ip: "{% if scenario_send_ip_version|int == 4 %}{{ receiver.ip }}{% else %}{{ receiver.ipv6 }}{% endif %}"
-      src_mac: "{{ sender.mac }}"
-    start_attack:
-      url: "http://{{ sdn_ip }}:{{ sdn_port }}/attack"
-      method: POST
-      body: "{{ attack_body }}"
-      ok_status: 201
-    stop_attack:
-      url: "http://{{ sdn_ip }}:{{ sdn_port }}/stopAttack"
-      method: POST
-      body: "{{ attack_body }}"
+    attack:
+      url: "http://{{ sdn_ip }}:{{ sdn_port }}/gwAttack"
+      body:
+        src_ip: "{% if scenario_send_ip_version|int == 4 %}{{ sender.ip }}{% else %}{{ sender.ipv6 }}{% endif %}"
+        packet_size: 112
+        attack_type: "UDP Flood"
+        dst_port: "{{ send_port }}"
+        dst_ip: "{% if scenario_send_ip_version|int == 4 %}{{ receiver.ip }}{% else %}{{ receiver.ipv6 }}{% endif %}"
+        src_mac: "{{ sender.mac }}"
       ok_status: 201
diff --git a/playbooks/scenarios/single_switch/data_drop_basic.yml b/playbooks/scenarios/single_switch/data_drop_basic.yml
index 7741024..5273707 100644
--- a/playbooks/scenarios/single_switch/data_drop_basic.yml
+++ b/playbooks/scenarios/single_switch/data_drop_basic.yml
@@ -39,13 +39,13 @@
 - hosts: "{{ rec_host }}"
   gather_facts: no
   tasks:
-    - name: Start mitigation with body {{ start_attack.body }} to {{ start_attack.url }}
+    - name: Start mitigation with body {{ attack.body }} to {{ attack.url }}
       uri:
-        url: "{{ start_attack.url }}"
-        method: "{{ start_attack.method }}"
-        body_format: "{{ start_attack.body_format | default('json') }}"
-        body: "{{ start_attack.body }}"
-        status_code: "{{ start_attack.ok_status | default('200') }}"
+        url: "{{ attack.url }}"
+        method: POST
+        body_format: "{{ attack.body_format | default('json') }}"
+        body: "{{ attack.body }}"
+        status_code: "{{ attack.ok_status | default('200') }}"
 
 # Sending UDP packets expect none to be received
 - import_playbook: ../test_cases/send_receive.yml
@@ -64,13 +64,13 @@
 - hosts: "{{ rec_host }}"
   gather_facts: no
   tasks:
-    - name: Stop mitigation with body {{ stop_attack.body }} to {{ stop_attack.url }}
+    - name: Stop mitigation with body {{ attack.body }} to {{ attack.url }}
       uri:
-        url: "{{ stop_attack.url }}"
-        method: "{{ stop_attack.method }}"
-        body_format: "{{ stop_attack.body_format | default('json') }}"
-        body: "{{ stop_attack.body }}"
-        status_code: "{{ stop_attack.ok_status | default('200') }}"
+        url: "{{ attack.url }}"
+        method: DELETE
+        body_format: "{{ attack.body_format | default('json') }}"
+        body: "{{ attack.body }}"
+        status_code: "{{ attack.ok_status | default('200') }}"
 
 # Sending UDP packets expect all to be received
 - import_playbook: ../test_cases/send_receive.yml
diff --git a/trans_sec/analytics/oinc.py b/trans_sec/analytics/oinc.py
index 0e54264..337cfb7 100644
--- a/trans_sec/analytics/oinc.py
+++ b/trans_sec/analytics/oinc.py
@@ -84,7 +84,7 @@ class PacketAnalytics(object):
         :raises Exception: due to the remote HTTP POST
         """
         logger.info('Start attack - %s', attack_dict)
-        self.sdn_interface.post('attack', attack_dict)
+        self.sdn_interface.post('gwAttack', attack_dict)
 
     @abc.abstractmethod
     def process_packet(self, packet, udp_dport=UDP_INT_DST_PORT):
diff --git a/trans_sec/controller/http_server_flask.py b/trans_sec/controller/http_server_flask.py
index a0fe7de..9e0acf0 100644
--- a/trans_sec/controller/http_server_flask.py
+++ b/trans_sec/controller/http_server_flask.py
@@ -36,17 +36,11 @@ class SDNControllerServer:
     def start(self):
         self.thread.start()
         self.api.add_resource(
-            GwAttack, '/attack',
-            resource_class_kwargs={'sdn_controller': self.sdn_controller})
-        self.api.add_resource(
-            StopGwAttack, '/stopAttack',
+            GwAttack, '/gwAttack',
             resource_class_kwargs={'sdn_controller': self.sdn_controller})
         self.api.add_resource(
             AggAttack, '/aggAttack',
             resource_class_kwargs={'sdn_controller': self.sdn_controller})
-        self.api.add_resource(
-            StopAggAttack, '/stopAggAttack',
-            resource_class_kwargs={'sdn_controller': self.sdn_controller})
         self.api.add_resource(Shutdown, '/shutdown')
 
     def stop(self):
@@ -83,15 +77,7 @@ class GwAttack(Resource):
         self.sdn_controller.add_attacker(args)
         return json.dumps({"success": True}), 201
 
-
-class StopGwAttack(Resource):
-    """
-    Class for exposing web service to issue a stop attack call to gateway.p4
-    """
-    def __init__(self, **kwargs):
-        self.sdn_controller = kwargs['sdn_controller']
-
-    def post(self):
+    def delete(self):
         logger.info('Attacker to remove')
         parser = reqparse.RequestParser()
         parser.add_argument('src_mac', type=str)
@@ -126,15 +112,7 @@ class AggAttack(Resource):
         self.sdn_controller.add_agg_attacker(args)
         return json.dumps({"success": True}), 201
 
-
-class StopAggAttack(Resource):
-    """
-    Class for exposing web service to issue a stop attack acll to aggregate.p4
-    """
-    def __init__(self, **kwargs):
-        self.sdn_controller = kwargs['sdn_controller']
-
-    def post(self):
+    def delete(self):
         logger.info('Attacker to remove')
         parser = reqparse.RequestParser()
         parser.add_argument('src_mac', type=str)

Refactor RESTful APIs for only one class per create/delete API
http_server_flask.py currently has 2 classes for each data_drop insert/delete (Gateway & Aggregate). As each is being called via POST while using the same payload, the delete method should be created from the remove classes "post" methods.
diff --git a/playbooks/scenarios/test_cases/send_receive.yml b/playbooks/scenarios/test_cases/send_receive.yml
index 6787853..3baa889 100644
--- a/playbooks/scenarios/test_cases/send_receive.yml
+++ b/playbooks/scenarios/test_cases/send_receive.yml
@@ -204,7 +204,7 @@
     - name: Call web service
       uri:
         url: "{{ cleanup_rest_call.url }}"
-        method: "{{ cleanup_rest_call.method }}"
+        method: DELETE
         body_format: json
         body: "{{ cleanup_rest_call.body }}"
         status_code: "{{ cleanup_rest_call.ok_status }}"
diff --git a/tests/trans_sec/controller/http_server_flask_tests.py b/tests/trans_sec/controller/http_server_flask_tests.py
index bb75e74..552ca1a 100644
--- a/tests/trans_sec/controller/http_server_flask_tests.py
+++ b/tests/trans_sec/controller/http_server_flask_tests.py
@@ -54,7 +54,7 @@ class HttpSessionTests(unittest.TestCase):
             'packet_size': '12',
             'attack_type': 'test',
         }
-        ret_val = requests.post(url='http://127.0.0.1:9998/attack',
+        ret_val = requests.post(url='http://127.0.0.1:9998/gwAttack',
                                 params=attack)
         self.assertEquals(201, ret_val.status_code)
 

pip install -e .
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio
apt-get update apt-get install -y gcc
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aniso8601==10.0.0
anytree==2.8.0
attrs==22.2.0
bleach==4.1.0
bottle==0.13.2
bottle-cors==0.1.5
certifi==2021.5.30
cffi==1.15.1
charset-normalizer==2.0.12
click==8.0.4
colorama==0.4.5
coverage==6.2
cryptography==40.0.2
cygrpc==1.0.4.post6
dataclasses==0.8
docutils==0.18.1
execnet==1.9.0
Flask==2.0.3
Flask-RESTful==0.3.10
greenlet==2.0.2
grpcio==1.23.0
grpcio-tools==1.23.0
idna==3.10
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig==1.1.1
ipaddress==1.0.23
itsdangerous==2.0.1
jeepney==0.7.1
Jinja2==3.0.3
keyring==23.4.1
MarkupSafe==2.0.1
mock==4.0.2
netaddr==0.10.1
packaging==21.3
Paste==3.10.1
pkginfo==1.10.0
pluggy==1.0.0
protobuf==3.19.6
psutil==7.0.0
py==1.11.0
pycparser==2.21
pydevd==2.10.0
Pygments==2.14.0
pyparsing==3.1.4
pytest==7.0.1
pytest-asyncio==0.16.0
pytest-cov==4.0.0
pytest-mock==3.6.1
pytest-xdist==3.0.2
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.1
readme-renderer==34.0
requests==2.27.1
requests-toolbelt==1.0.0
rfc3986==1.5.0
scapy==2.5.0
SecretStorage==3.3.3
six==1.17.0
tomli==1.2.3
tqdm==4.64.1
-e git+https://github.com/cablelabs/transparent-security.git@42d46559f511a9c2ea81d6a02e92ac7187e36581#egg=transparent_security
twine==3.8.0
typing_extensions==4.1.1
urllib3==1.26.20
webencodings==0.5.1
Werkzeug==2.0.3
zipp==3.6.0

name: transparent-security
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aniso8601==10.0.0
      - anytree==2.8.0
      - attrs==22.2.0
      - bleach==4.1.0
      - bottle==0.13.2
      - bottle-cors==0.1.5
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - click==8.0.4
      - colorama==0.4.5
      - coverage==6.2
      - cryptography==40.0.2
      - cygrpc==1.0.4.post6
      - dataclasses==0.8
      - docutils==0.18.1
      - execnet==1.9.0
      - flask==2.0.3
      - flask-restful==0.3.10
      - greenlet==2.0.2
      - grpcio==1.23.0
      - grpcio-tools==1.23.0
      - idna==3.10
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - ipaddress==1.0.23
      - itsdangerous==2.0.1
      - jeepney==0.7.1
      - jinja2==3.0.3
      - keyring==23.4.1
      - markupsafe==2.0.1
      - mock==4.0.2
      - netaddr==0.10.1
      - packaging==21.3
      - paste==3.10.1
      - pkginfo==1.10.0
      - pluggy==1.0.0
      - protobuf==3.19.6
      - psutil==7.0.0
      - py==1.11.0
      - pycparser==2.21
      - pydevd==2.10.0
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-asyncio==0.16.0
      - pytest-cov==4.0.0
      - pytest-mock==3.6.1
      - pytest-xdist==3.0.2
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.1
      - readme-renderer==34.0
      - requests==2.27.1
      - requests-toolbelt==1.0.0
      - rfc3986==1.5.0
      - scapy==2.5.0
      - secretstorage==3.3.3
      - six==1.17.0
      - tomli==1.2.3
      - tqdm==4.64.1
      - twine==3.8.0
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - webencodings==0.5.1
      - werkzeug==2.0.3
      - zipp==3.6.0
prefix: /opt/conda/envs/transparent-security

tests/trans_sec/controller/http_server_flask_tests.py::HttpSessionTests::test_session
playbooks/scenarios/full/packet-flood.yml playbooks/scenarios/single_switch/data_drop_basic.yml playbooks/scenarios/gateway/data-drop.yml trans_sec/controller/http_server_flask.py trans_sec/analytics/oinc.py
playbooks/scenarios/full/packet-flood.yml playbooks/scenarios/single_switch/data_drop_basic.yml playbooks/scenarios/gateway/data-drop.yml trans_sec/controller/http_server_flask.py trans_sec/analytics/oinc.py