From 9e24d21282e86f2fa8bfcc5f04f9998199fa841e Mon Sep 17 00:00:00 2001 From: reyesj2 <94730068+reyesj2@users.noreply.github.com> Date: Wed, 17 Sep 2025 11:41:27 -0500 Subject: [PATCH] remove unused functions from so-elastic-fleet-common --- .../tools/sbin/so-elastic-fleet-common | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/salt/elasticfleet/tools/sbin/so-elastic-fleet-common b/salt/elasticfleet/tools/sbin/so-elastic-fleet-common index 873cb6e0d..ee174e159 100644 --- a/salt/elasticfleet/tools/sbin/so-elastic-fleet-common +++ b/salt/elasticfleet/tools/sbin/so-elastic-fleet-common @@ -124,11 +124,6 @@ elastic_fleet_bulk_package_install() { fi } -elastic_fleet_package_is_installed() { - PACKAGE=$1 - curl -s -K /opt/so/conf/elasticsearch/curl.config -b "sid=$SESSIONCOOKIE" -L -X GET -H 'kbn-xsrf: true' "localhost:5601/api/fleet/epm/packages/$PACKAGE" | jq -r '.item.status' -} - elastic_fleet_installed_packages() { curl -s -K /opt/so/conf/elasticsearch/curl.config -b "sid=$SESSIONCOOKIE" -L -X GET -H 'kbn-xsrf: true' -H 'Content-Type: application/json' "localhost:5601/api/fleet/epm/packages/installed?perPage=500" } @@ -141,14 +136,6 @@ elastic_fleet_agent_policy_ids() { fi } -elastic_fleet_agent_policy_names() { - curl -s -K /opt/so/conf/elasticsearch/curl.config -b "sid=$SESSIONCOOKIE" -L -X GET "localhost:5601/api/fleet/agent_policies" | jq -r .items[].name - if [ $? -ne 0 ]; then - echo "Error: Failed to retrieve agent policies." - exit 1 - fi -} - elastic_fleet_integration_policy_names() { AGENT_POLICY=$1 curl -s -K /opt/so/conf/elasticsearch/curl.config -b "sid=$SESSIONCOOKIE" -L -X GET "localhost:5601/api/fleet/agent_policies/$AGENT_POLICY" | jq -r .item.package_policies[].name @@ -221,12 +208,3 @@ elastic_fleet_policy_create() { fi } - -elastic_fleet_policy_update() { - - POLICYID=$1 - JSON_STRING=$2 - - curl -K /opt/so/conf/elasticsearch/curl.config -L -X PUT "localhost:5601/api/fleet/agent_policies/$POLICYID" -H 'kbn-xsrf: true' -H 'Content-Type: application/json' -d "$JSON_STRING" -} -