diff --git a/.meta_Topology b/.meta_Topology deleted file mode 100755 index 82a62f1b7..000000000 --- a/.meta_Topology +++ /dev/null @@ -1,39 +0,0 @@ - - - - - MODEL - - - DATE_MODIFICATION - 1513269379142 - - - COMMENT - - - - REPOSITORY - CommandDefinition - - - DATE_CREATION - 1513269379130 - - - MANUFACTURER - - - CONFIGURATION_FILTER - - - - TYPE - DIRECTORY - - - TAG - - - - diff --git a/Analytics/Kibana/.meta_Process_Create_Report_Dashboard b/Analytics/Kibana/.meta_Process_Create_Report_Dashboard deleted file mode 100755 index 6da2a29ab..000000000 --- a/Analytics/Kibana/.meta_Process_Create_Report_Dashboard +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1473866149892 - - - DATE_CREATION - 1473866147847 - - - TYPE - DIRECTORY - - - diff --git a/Analytics/Kibana/.meta_Process_Delete_Instance b/Analytics/Kibana/.meta_Process_Delete_Instance deleted file mode 100755 index 1229a88e1..000000000 --- a/Analytics/Kibana/.meta_Process_Delete_Instance +++ /dev/null @@ -1,31 +0,0 @@ - - - - - DISPLAYNAME - Process_Delete_Instance - - - DATE_MODIFICATION - 1609852942286 - - - REPOSITORY - Process - - - DATE_CREATION - 1609852942279 - - - TAG - - - TYPE - DIRECTORY - - - COMMENT - - - diff --git a/Analytics/Kibana/.meta_Process_Update_Dashboard b/Analytics/Kibana/.meta_Process_Update_Dashboard deleted file mode 100755 index 5647cbe49..000000000 --- a/Analytics/Kibana/.meta_Process_Update_Dashboard +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1473866516693 - - - DATE_CREATION - 1473866516651 - - - TYPE - DIRECTORY - - - diff --git a/Analytics/Kibana/.meta_kibana_dashboard.xml b/Analytics/Kibana/.meta_kibana_dashboard.xml deleted file mode 100755 index 14353521d..000000000 --- a/Analytics/Kibana/.meta_kibana_dashboard.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - DISPLAYNAME - kibana_dashboard.xml - - - DATE_MODIFICATION - 1633377872118 - - - REPOSITORY - Process - - - DATE_CREATION - 1633377872112 - - - MODEL - 0 - - - TAG - - - FILE_TYPE - unknown - - - MANUFACTURER - 0 - - - TYPE - FILE - - - COMMENT - - - diff --git a/Analytics/Kibana/Process_Create_Report_Dashboard/.meta_Task_Search_Dashboard_Template_Selected.php b/Analytics/Kibana/Process_Create_Report_Dashboard/.meta_Task_Search_Dashboard_Template_Selected.php deleted file mode 100755 index 09e27cb7d..000000000 --- a/Analytics/Kibana/Process_Create_Report_Dashboard/.meta_Task_Search_Dashboard_Template_Selected.php +++ /dev/null @@ -1,35 +0,0 @@ - - - - - DISPLAYNAME - Task_Search_Dashboard_Template_Selected.php - - - DATE_MODIFICATION - 1633377838235 - - - REPOSITORY - Process - - - DATE_CREATION - 1618372823701 - - - TAG - - - FILE_TYPE - text - - - TYPE - UPLOAD - - - COMMENT - - - diff --git a/Analytics/Kibana/Process_Create_Report_Dashboard/Task_Search_Dashboard_Template_Selected.php b/Analytics/Kibana/Process_Create_Report_Dashboard/Task_Search_Dashboard_Template_Selected.php deleted file mode 100755 index b9b70d231..000000000 --- a/Analytics/Kibana/Process_Create_Report_Dashboard/Task_Search_Dashboard_Template_Selected.php +++ /dev/null @@ -1,82 +0,0 @@ - '.$result.''); -} -//task_exit(ENDED, $result); -?> \ No newline at end of file diff --git a/Analytics/Kibana/Process_Delete_Instance/.meta_Tasks b/Analytics/Kibana/Process_Delete_Instance/.meta_Tasks deleted file mode 100755 index 878022a0f..000000000 --- a/Analytics/Kibana/Process_Delete_Instance/.meta_Tasks +++ /dev/null @@ -1,31 +0,0 @@ - - - - - DISPLAYNAME - Tasks - - - DATE_MODIFICATION - 1609852942385 - - - REPOSITORY - Process - - - DATE_CREATION - 1609852942379 - - - TAG - - - TYPE - DIRECTORY - - - COMMENT - - - diff --git a/Analytics/Kibana/Process_Update_Dashboard/.meta_Task_Search_Dashboard_Selected_for_Updating.php b/Analytics/Kibana/Process_Update_Dashboard/.meta_Task_Search_Dashboard_Selected_for_Updating.php deleted file mode 100755 index 1ef7c7da1..000000000 --- a/Analytics/Kibana/Process_Update_Dashboard/.meta_Task_Search_Dashboard_Selected_for_Updating.php +++ /dev/null @@ -1,35 +0,0 @@ - - - - - DISPLAYNAME - Task_Search_Dashboard_Selected_for_Updating.php - - - DATE_MODIFICATION - 1633377856798 - - - REPOSITORY - Process - - - DATE_CREATION - 1618373290266 - - - TAG - - - FILE_TYPE - text - - - TYPE - UPLOAD - - - COMMENT - - - diff --git a/Analytics/Kibana/Process_Update_Dashboard/Task_Search_Dashboard_Selected_for_Updating.php b/Analytics/Kibana/Process_Update_Dashboard/Task_Search_Dashboard_Selected_for_Updating.php deleted file mode 100755 index a4b8e09fa..000000000 --- a/Analytics/Kibana/Process_Update_Dashboard/Task_Search_Dashboard_Selected_for_Updating.php +++ /dev/null @@ -1,72 +0,0 @@ - '.$result.''); -} -//task_exit(ENDED, $result); -?> \ No newline at end of file diff --git a/Analytics/Kibana/kibana_dashboard.xml b/Analytics/Kibana/kibana_dashboard.xml deleted file mode 100755 index 387d9c4c2..000000000 --- a/Analytics/Kibana/kibana_dashboard.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - template_default - template_Email_Overview - template_WEB - template_USER - template_URL - template_NF_BYTES_IP_PORT - template_Event_Alarm - template_Event_Alarm_Rule - template_Events_Per_Traffic - template_NF_Counter - - - - - - - - - - - - - Dashboard View Enablement - CREATE - 5 - - - /opt/fmc_repository/Process/Analytics/Kibana/Process_Create_Report_Dashboard/ - Search Dashboard Template Selected - - - - Update Dashboard View Enablement - UPDATE - 5 - - - /opt/fmc_repository/Process/Analytics/Kibana/Process_Update_Dashboard/ - Search Dashboard Selected for Updating - - - - Delete Instance - DELETE - 5 - - - - /images/eclipseIcons/page_obj.gif - - dashboardName - php - 10000 - 5 - Deploy Dashboard - Dashboard - - diff --git a/Topology/.meta_Process_Call_For_Device b/Topology/.meta_Process_Call_For_Device deleted file mode 100755 index 55c3942d6..000000000 --- a/Topology/.meta_Process_Call_For_Device +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1492682243720 - - - DATE_CREATION - 1492682243688 - - - TYPE - DIRECTORY - - - diff --git a/Topology/.meta_Process_Call_Service b/Topology/.meta_Process_Call_Service deleted file mode 100755 index 55c3942d6..000000000 --- a/Topology/.meta_Process_Call_Service +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1492682243720 - - - DATE_CREATION - 1492682243688 - - - TYPE - DIRECTORY - - - diff --git a/Topology/.meta_Process_Create_View b/Topology/.meta_Process_Create_View deleted file mode 100755 index ea26ef15c..000000000 --- a/Topology/.meta_Process_Create_View +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1490773172307 - - - DATE_CREATION - 1490773172299 - - - TYPE - DIRECTORY - - - diff --git a/Topology/.meta_Process_Delete_View b/Topology/.meta_Process_Delete_View deleted file mode 100755 index 1c5bee40f..000000000 --- a/Topology/.meta_Process_Delete_View +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1490773212566 - - - DATE_CREATION - 1490773212558 - - - TYPE - DIRECTORY - - - diff --git a/Topology/.meta_Process_Save b/Topology/.meta_Process_Save deleted file mode 100755 index d5e0cf50d..000000000 --- a/Topology/.meta_Process_Save +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1497951270597 - - - DATE_CREATION - 1497951270561 - - - TYPE - DIRECTORY - - - diff --git a/Topology/.meta_Process_Update_View b/Topology/.meta_Process_Update_View deleted file mode 100755 index a5907e48b..000000000 --- a/Topology/.meta_Process_Update_View +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1490773202083 - - - DATE_CREATION - 1490773202076 - - - TYPE - DIRECTORY - - - diff --git a/Topology/.meta_Topology.xml b/Topology/.meta_Topology.xml deleted file mode 100755 index 14d0759d1..000000000 --- a/Topology/.meta_Topology.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - DATE_MODIFICATION - 1606224624688 - - - REPOSITORY - Process - - - DATE_CREATION - 1606224624662 - - - MODEL - 0 - - - TAG - - - FILE_TYPE - text - - - MANUFACTURER - 0 - - - TYPE - FILE - - - COMMENT - - - diff --git a/Topology/.meta_Topology_Types b/Topology/.meta_Topology_Types deleted file mode 100755 index ea26ef15c..000000000 --- a/Topology/.meta_Topology_Types +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1490773172307 - - - DATE_CREATION - 1490773172299 - - - TYPE - DIRECTORY - - - diff --git a/Topology/Common/Topology_common.php b/Topology/Common/Topology_common.php deleted file mode 100755 index 22bbda6f1..000000000 --- a/Topology/Common/Topology_common.php +++ /dev/null @@ -1,294 +0,0 @@ - $details) { - createTopologyNetwork($details['rd'], $details['object_id'], "network", ""); - } - - - $customer_ref = get_customer_ref(); - $list = json_decode(_lookup_list_devices_by_customer_reference($customer_ref), false); - - foreach ($list->wo_newparams as $value) { - if (strpos($value->name, 'PE') !== false) { - $deviceId = $value->id; - $name = $value->name; - $response = _device_read_by_id ($deviceId); - $device_info = json_decode($response); - logToFile(debug_dump($device_info, "DEBUG: DEVICE INFO")); - $device_nature = $device_info->wo_newparams->sdNature; - $status = getStatus($deviceId); - - $error = processDevice($deviceId, $name, $device_nature, $status); - - if ($error != "") { - logTofile(debug_dump($error, "*** topology_create_view ERROR***")); - } - } - } - - foreach ($list->wo_newparams as $value) { - if (strpos($value->name, 'CE') !== false) { - $deviceId = $value->id; - $name = $value->name; - $response = _device_read_by_id ($deviceId); - $device_info = json_decode($response); - logToFile(debug_dump($device_info, "DEBUG: DEVICE INFO")); - $device_nature = $device_info->wo_newparams->sdNature; - $status = getStatus($deviceId); - - $error = processDevice($deviceId, $name, $device_nature, $status); - - if ($error != "") { - logTofile(debug_dump($error, "*** topology_create_view ERROR***")); - } - } - } - - - return prepare_json_response(ENDED, "The topology has fully loaded", $context, false); - -} - - - - -function topology_create_view() { - global $context; - - logToFile("*** topology_create_view"); - - $context ['Nodes'] = array (); - $context ['Nodes_MAJ'] = array (); - - $customer_ref = get_customer_ref(); - $list = json_decode(_lookup_list_devices_by_customer_reference($customer_ref), false); - - foreach ($list->wo_newparams as $value) { - $deviceId = $value->id; - $name = $value->name; - $response = _device_read_by_id ($deviceId); - $device_info = json_decode($response); - $device_nature = $device_info->wo_newparams->sdNature; - $status = getStatus($deviceId); - - $error = processDevice($deviceId, $name, $device_nature, $status); - - if ($error != "") { - logTofile(debug_dump($error, "*** topology_create_view ERROR***")); - } - } - - return prepare_json_response(ENDED, "The topology has fully loaded", $context, false); -} - - -function topology_update_service_view($ipam_device_id) { - global $context; - - - logToFile("*** topology_update_view"); - - if (!isset($context ["Nodes"])) { - $context ['Nodes'] = array (); - } - - if (!isset($context ["Nodes_MAJ"])) { - $context ['Nodes_MAJ'] = array (); - } - - - $response = json_decode(import_objects($ipam_device_id, array('vrf')), True); - $object_ids_array = $response['wo_newparams']['vrf']; - - foreach ($object_ids_array as $vrf => $details) { - createTopologyNetwork($details['rd'], $details['object_id'], "network", ""); - } - - - $customer_ref = get_customer_ref(); - $list = json_decode(_lookup_list_devices_by_customer_reference($customer_ref), false); - - foreach ($list->wo_newparams as $value) { - if (strpos($value->name, 'PE') !== false) { - $deviceId = $value->id; - $name = $value->name; - $response = _device_read_by_id ($deviceId); - $device_info = json_decode($response); - $device_nature = $device_info->wo_newparams->sdNature; - $status = getStatus($deviceId); - - $error = processDevice($deviceId, $name, $device_nature, $status); - - if ($error != "") { - logTofile(debug_dump($error, "*** topology_update_view ERROR***")); - } - } - } - - - foreach ($list->wo_newparams as $value) { - if (strpos($value->name, 'CE') !== false) { - $deviceId = $value->id; - $name = $value->name; - $response = _device_read_by_id ($deviceId); - $device_info = json_decode($response); - logToFile(debug_dump($device_info, "DEBUG: DEVICE INFO")); - $device_nature = $device_info->wo_newparams->sdNature; - $status = getStatus($deviceId); - - $error = processDevice($deviceId, $name, $device_nature, $status); - - if ($error != "") { - logTofile(debug_dump($error, "*** topology_create_view ERROR***")); - } - } - } - - return prepare_json_response(ENDED, "The topology has fully loaded", $context, false); - -} - -function topology_update_view() { - global $context; - - logToFile("*** topology_update_view"); - - if (!isset($context ["Nodes"])) { - $context ['Nodes'] = array (); - } - - if (!isset($context ["Nodes_MAJ"])) { - $context ['Nodes_MAJ'] = array (); - } - - $customer_ref = get_customer_ref(); - $list = json_decode(_lookup_list_devices_by_customer_reference($customer_ref), false); - - foreach ($list->wo_newparams as $value) { - $deviceId = $value->id; - $name = $value->name; - $response = _device_read_by_id ($deviceId); - logToFile(debug_dump($response, "DEVICE INFO: \n")); - $device_info = json_decode($response); - $device_nature = $device_info->wo_newparams->sdNature; - $status = getStatus($deviceId); - $error = processDevice($deviceId, $name, $device_nature, $status); - - if ($error != "") { - logTofile(debug_dump($error, "*** topology_update_view ERROR ***")); - } - } - - return prepare_json_response(ENDED, "Topology fully loaded", $context, false); -} - -function processDevice($device_id, $name, $device_nature, $status) { - logToFile("*** processDevice <$name> ID: $device_id STATUS: $status"); - try { - if($status == "OK") { - calculateDeviceTopology($device_id, $name, $device_nature, $status); - } else { - createTopology($device_id, $name, $device_nature, "router", "", $status); - } - } catch (Exception $e) { - logTofile(debug_dump($e, "************** processDevice ERROR **************")); - echo prepare_json_response(FAILED, "FAILED", $context, true); - exit; - } -} - -function getStatus($device_id) { - $info = json_decode(_device_get_status($device_id), true); - $status = $info ["wo_newparams"]; - logToFile("*** getStatus <$device_id> => $status"); - - if (empty($status) || $status == "") { - return "Managed Entity with id " . $device_id . " was not found"; - } else { - if ($status == "UP") { - return "OK"; - } else if ($status == "UNREACHABLE") { - return "ERROR"; - } else if ($status == "CRITICAL") { - return "CRITICAL"; - } - return "NEVERREACHED"; - } -} - -function get_customer_ref() { - global $context; - - // read the customer and get the external reference - $customer_db_id = substr($context ["UBIQUBEID"],4); - $response = _customer_read_by_id($customer_db_id); - $response = json_decode($response, true); - if ($response['wo_status'] !== ENDED) { - $response = json_encode($response); - echo $response; - exit; - } - - $customer_ref = $response['wo_newparams']['externalReference']; - return $customer_ref; -} - -function calcMask($maskAdr) { - $maskPart = explode(".", $maskAdr); - $mask = ""; - foreach ($maskPart as $val) { - $mask .= decbin(intval($val)); - } - $result=0; - $pos = strpos($mask, "0"); - if ($pos !== false) { - $result = $pos; - } else { - $result = 32; - } - logTofile("calcMask ".$maskAdr." -> ".$result); - return $result; -} - -function getNetworkByAddressAndMask($address, $mask) { - $addressParts = explode(".", $address); - $networkAddressBinary = ""; - foreach ($addressParts as $val) { - $morceauBinaire = decbin(intval($val)); - while (strlen($morceauBinaire) < 8) { - $morceauBinaire = "0" . $morceauBinaire; - } - $networkAddressBinary .= $morceauBinaire; - } - - $networkAddressBinary = substr($networkAddressBinary, 0, $mask); - while (strlen($networkAddressBinary) < 32) { - $networkAddressBinary .= "0"; - } - - $addressMasked = ""; - for($i = 0; $i < 32; $i = $i + 8) { - $part = intval(substr($networkAddressBinary, $i, 8), 2); - $addressMasked .= $part . "."; - } - - $addressMasked = substr($addressMasked, 0, strlen($addressMasked) - 1); - logTofile("getNetworkByAddressAndMask: ".$address." ".$mask." -> ".$addressMasked."\n"); - return $addressMasked; -} - -?> diff --git a/Topology/Common/Topology_populate.php b/Topology/Common/Topology_populate.php deleted file mode 100755 index d01e94263..000000000 --- a/Topology/Common/Topology_populate.php +++ /dev/null @@ -1,98 +0,0 @@ - $value) { - if($value["object_id"] == $nodeId) { - return $key; - } - } - return -1; -} - -/* - * creates a new topology element for a managed entity - * return: the node index in the array $context['Nodes'] - */ -function createTopology($nodeId, $name, $device_nature, $subtype, $image, $status) { - global $context; - logTofile("*** createTopology nodeId: ".$nodeId. " name " .$name." subtype ". $subtype." status ".$status." \n"); - - $place = _topology_exist_object_this_instance($nodeId); - - if ($place == -1) { - $context['Nodes'][] = array( - "primary_key" => (string)$nodeId, - "device_nature" => $device_nature, - "name" => $name, - "object_id" => (string)$nodeId, - "x" => "", - "y" => "", - "description" => "", - "subtype" => $subtype, - "image" => $image, - "color" => "#acd7e5", - "hidden" => "false", - "cluster_id" => "", - "status" => $status - ); - - $place = _topology_exist_object_this_instance($nodeId); - } else { - unset($context['Nodes'][$place]["link"]); - $context['Nodes'][$place]["name"] = $name; - $context['Nodes'][$place]["image"] = $image; - $context['Nodes'][$place]["status"] = $status; - } - - $context['Nodes_MAJ'][] = array( - "object_id" => $nodeId, - "primary_key" => $nodeId - ); - //logTofile(debug_dump($context, "*** createTopology context \n")); - - return $place; -} - -/* - * create a new topology element for the network - */ -function createTopologyNetwork($nodeId, $name, $subtype, $image) { - global $context; - - $place = _topology_exist_object_this_instance($nodeId); - if ($place == -1) { - $context['Nodes'][] = array( - "primary_key" => $nodeId, - "name" => $name, - "object_id" => $nodeId, - "x" => "", - "y" => "", - "description" => "", - "subtype" => $subtype, - "image" => $image, - "color" => "#acd7e5", - "hidden" => "false", - "cluster_id" => "" - ); - - $place = _topology_exist_object_this_instance($nodeId); - } else { - unset($context['Nodes'][$place]["link"]); - $context['Nodes'][$place]["name"] = $name; - $context['Nodes'][$place]["image"] = $image; - } - - $context['Nodes_MAJ'][] = array( - "object_id" => $nodeId, - "primary_key" => $nodeId - ); - logTofile("*** createTopologyNetwork nodeId: ".$nodeId. " name " .$name." subtype ". $subtype." place ". $place."\n"); - //logTofile(debug_dump($context, "*** createTopologyNetwork context ***")); - - return $place; -} - - -?> \ No newline at end of file diff --git a/Topology/Process_Call_For_Device/.meta_Tasks b/Topology/Process_Call_For_Device/.meta_Tasks deleted file mode 100755 index 8ab4921ff..000000000 --- a/Topology/Process_Call_For_Device/.meta_Tasks +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1490775312844 - - - DATE_CREATION - 1490775312837 - - - TYPE - DIRECTORY - - - diff --git a/Topology/Process_Call_For_Device/Tasks/.meta_Task_Call_For_Devicephp b/Topology/Process_Call_For_Device/Tasks/.meta_Task_Call_For_Devicephp deleted file mode 100755 index 4ac484a90..000000000 --- a/Topology/Process_Call_For_Device/Tasks/.meta_Task_Call_For_Devicephp +++ /dev/null @@ -1,29 +0,0 @@ - - - - - FILE_TYPE - text - - - DATE_MODIFICATION - 1490775379501 - - - COMMENT - - - - DATE_CREATION - 1490775312860 - - - TAG - - - - TYPE - UPLOAD - - - diff --git a/Topology/Process_Call_For_Device/Tasks/Task_Call_For_Device.php b/Topology/Process_Call_For_Device/Tasks/Task_Call_For_Device.php deleted file mode 100755 index 9fa94d81c..000000000 --- a/Topology/Process_Call_For_Device/Tasks/Task_Call_For_Device.php +++ /dev/null @@ -1,47 +0,0 @@ -wo_newparams->sdNature; - $status = getStatus($device_id); - if($status == "UP") { - startSNMPForDevice($device_id, $name, $device_nature); - } else { - if($status == "UNREACHABLE") { - createTopology($device_id, $name, $device_nature, "router", "style/topology/img/router_ERROR.svg"); - } else if($status == "NEVERREACHED") { - createTopology($device_id, $name, $device_nature, "router", "style/topology/img/router_NEVERREACHED.svg"); - } else if($status == "CRITICAL") { - createTopology($device_id, $name, $device_nature, "router", "style/topology/img/router_CRITICAL.svg"); - } - } - echo prepare_json_response(ENDED, $device_id, $context, false); -} catch (Exception $e) { - logTofile(debug_dump($e, "**************TOPOLOGY ERRORT**************")); - echo prepare_json_response(FAILED, "FAILED", $context, true); -} - -?> \ No newline at end of file diff --git a/Topology/Process_Create_View/.meta_Tasks b/Topology/Process_Create_View/.meta_Tasks deleted file mode 100755 index 8ab4921ff..000000000 --- a/Topology/Process_Create_View/.meta_Tasks +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1490775312844 - - - DATE_CREATION - 1490775312837 - - - TYPE - DIRECTORY - - - diff --git a/Topology/Process_Create_View/Tasks/.meta_Task_Create.php b/Topology/Process_Create_View/Tasks/.meta_Task_Create.php deleted file mode 100755 index 1e959ed90..000000000 --- a/Topology/Process_Create_View/Tasks/.meta_Task_Create.php +++ /dev/null @@ -1,31 +0,0 @@ - - - - - DATE_MODIFICATION - 1602148554194 - - - REPOSITORY - Process - - - DATE_CREATION - 1602148554181 - - - TAG - - - FILE_TYPE - text - - - TYPE - UPLOAD - - - COMMENT - - - diff --git a/Topology/Process_Create_View/Tasks/Task_Create.php b/Topology/Process_Create_View/Tasks/Task_Create.php deleted file mode 100755 index 98606be88..000000000 --- a/Topology/Process_Create_View/Tasks/Task_Create.php +++ /dev/null @@ -1,38 +0,0 @@ - diff --git a/Topology/Process_Save_View/.meta_Tasks b/Topology/Process_Save_View/.meta_Tasks deleted file mode 100755 index 8ab4921ff..000000000 --- a/Topology/Process_Save_View/.meta_Tasks +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1490775312844 - - - DATE_CREATION - 1490775312837 - - - TYPE - DIRECTORY - - - diff --git a/Topology/Process_Save_View/Tasks/.meta_Task_Save.php b/Topology/Process_Save_View/Tasks/.meta_Task_Save.php deleted file mode 100755 index 4ac484a90..000000000 --- a/Topology/Process_Save_View/Tasks/.meta_Task_Save.php +++ /dev/null @@ -1,29 +0,0 @@ - - - - - FILE_TYPE - text - - - DATE_MODIFICATION - 1490775379501 - - - COMMENT - - - - DATE_CREATION - 1490775312860 - - - TAG - - - - TYPE - UPLOAD - - - diff --git a/Topology/Process_Save_View/Tasks/Task_Save.php b/Topology/Process_Save_View/Tasks/Task_Save.php deleted file mode 100755 index 4e2368073..000000000 --- a/Topology/Process_Save_View/Tasks/Task_Save.php +++ /dev/null @@ -1,10 +0,0 @@ - \ No newline at end of file diff --git a/Topology/Process_Update_View/.meta_Tasks b/Topology/Process_Update_View/.meta_Tasks deleted file mode 100755 index f4c4fcfb3..000000000 --- a/Topology/Process_Update_View/.meta_Tasks +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1490775426577 - - - DATE_CREATION - 1490775426569 - - - TYPE - DIRECTORY - - - diff --git a/Topology/Process_Update_View/Tasks/.meta_Task_Manage_New.php b/Topology/Process_Update_View/Tasks/.meta_Task_Manage_New.php deleted file mode 100755 index 202eec391..000000000 --- a/Topology/Process_Update_View/Tasks/.meta_Task_Manage_New.php +++ /dev/null @@ -1,29 +0,0 @@ - - - - - FILE_TYPE - text - - - DATE_MODIFICATION - 1490775426599 - - - COMMENT - - - - DATE_CREATION - 1490775426596 - - - TAG - - - - TYPE - UPLOAD - - - diff --git a/Topology/Process_Update_View/Tasks/.meta_Task_Update.php b/Topology/Process_Update_View/Tasks/.meta_Task_Update.php deleted file mode 100755 index 7e79c5970..000000000 --- a/Topology/Process_Update_View/Tasks/.meta_Task_Update.php +++ /dev/null @@ -1,31 +0,0 @@ - - - - - DATE_MODIFICATION - 1602162155718 - - - REPOSITORY - Process - - - DATE_CREATION - 1602162155707 - - - TAG - - - FILE_TYPE - text - - - TYPE - UPLOAD - - - COMMENT - - - diff --git a/Topology/Process_Update_View/Tasks/Task_Manage_New.php b/Topology/Process_Update_View/Tasks/Task_Manage_New.php deleted file mode 100755 index 2672e7762..000000000 --- a/Topology/Process_Update_View/Tasks/Task_Manage_New.php +++ /dev/null @@ -1,48 +0,0 @@ - $value) { - $contains = false; - - if($value["subtype"] == "cluster") { - foreach ($context["Nodes_MAJ"] as $value2) { - if($value2["cluster_id"] == $value["object_id"]) { - $contains = true; - break; - } - } - } else { - foreach ($context["Nodes_MAJ"] as $value2) { - if($value2["object_id"] == $value["object_id"]) { - $contains = true; - break; - } - } - } - if(!$contains) { - $TO_DELETE[] = $key; - } -} - -foreach ($TO_DELETE as $value) { - unset($context["Nodes"][$value]); -} - -unset($context["Nodes_MAJ"]); - -echo prepare_json_response(ENDED, "The new devices are managed", $context, false); - -?> diff --git a/Topology/Process_Update_View/Tasks/Task_Update.php b/Topology/Process_Update_View/Tasks/Task_Update.php deleted file mode 100755 index 57263c579..000000000 --- a/Topology/Process_Update_View/Tasks/Task_Update.php +++ /dev/null @@ -1,37 +0,0 @@ - diff --git a/Topology/Topology.xml b/Topology/Topology.xml deleted file mode 100755 index 075e2a55f..000000000 --- a/Topology/Topology.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - SNMP - VLAN - VRF - - - - - - - - - - - - - - - - - - - - Create - CREATE - 5 - - /opt/fmc_repository/Process/Topology/Process_Create_View/Tasks - Create - - - /opt/fmc_repository/Process/Topology/Process_Update_View/Tasks - Manage_New - - - - Update - UPDATE - 5 - - /opt/fmc_repository/Process/Topology/Process_Update_View/Tasks - Update - - - /opt/fmc_repository/Process/Topology/Process_Update_View/Tasks - Manage_New - - - - Delete - DELETE - 5 - - - Device Polling - UPDATE - 0 - - /opt/fmc_repository/Process/Topology/Process_Call_For_Device/Tasks - Call Service - - - - Save - UPDATE - 0 - - /opt/fmc_repository/Process/Topology/Process_Save_View/Tasks - Save - - - - /images/eclipseIcons/page_obj.gif - Computes the topology for the UI - service_id - php - 10000 - 5 - Topology - MSA|Topology - - diff --git a/Topology/Topology_Types/.meta_SNMP b/Topology/Topology_Types/.meta_SNMP deleted file mode 100755 index ea26ef15c..000000000 --- a/Topology/Topology_Types/.meta_SNMP +++ /dev/null @@ -1,17 +0,0 @@ - - - - - DATE_MODIFICATION - 1490773172307 - - - DATE_CREATION - 1490773172299 - - - TYPE - DIRECTORY - - - diff --git a/Topology/Topology_Types/SNMP.php b/Topology/Topology_Types/SNMP.php deleted file mode 100755 index abebd12e3..000000000 --- a/Topology/Topology_Types/SNMP.php +++ /dev/null @@ -1,108 +0,0 @@ -&1"; - logTofile("*** calculateDeviceTopology SNMP COMMAND: ".$cmd."\n"); - exec($cmd, $value, $error); - if (!$error) { - foreach ($value as $search) { - if (searchAdress($search, $matches) != false) { - logTofile(debug_dump($matches, "checkSNMPResponds searchAdress matches:\n")); - if ($matches [1] [0] != 127) { - $address_link = $matches [0] [0]; - $maskAdr = $matches [0] [1]; - $mask = calcMask($maskAdr); - $address_link_masked = getNetworkByAddressAndMask($address_link, $mask); - $addressAndMask = $address_link_masked . "/" . $mask; - createTopologyNetwork(str_replace(".", "_", $addressAndMask), $addressAndMask, "network", ""); - $context ['Nodes'] [$nodePlace] ["links"] [] = $addressAndMask; - } - } - } - } else { - logTofile(debug_dump($value, "*** calculateDeviceTopology ERROR_1***\n")); - } - } catch (Exception $e) { - logTofile(debug_dump($e->getMessage(), "*** calculateDeviceTopology ERROR_2***\n")); - } - } else { - logTofile(debug_dump($error, "*** calculateDeviceTopology ERROR_3 ***\n")); - } -} - -function checkSNMPResponds($community, $address) { - $cmd_SNMP_RESPOND = "timeout 1 snmpwalk -v2c -c $community $address SNMPv2-MIB::sysName 2>&1"; - logToFile("checkSNMPResponds with command: " . $cmd_SNMP_RESPOND . "\n"); - $res = exec($cmd_SNMP_RESPOND, $value, $error); - logToFile("checkSNMPResponds result: " . $res . "\n"); - - if ($error) { - throw new Exception("checkSNMPResponds SNMP NOT AVAILABLE ON " . $address); - } -} - -function searchAdress($search, &$matches) { - $res = preg_match_all('#([0-9]{1,3})(\.[0-9]{1,3}){3}#', $search, $matches); - logToFile("searchAdress : search " . $search . " result:".$res."\n"); - return $res; -} - -function readInformationsFromDevice($device_id, &$community, &$address) { - $info = json_decode(_device_read_by_id($device_id), true); - - if ($info ["wo_status"] == "FAIL") { - return $info ["wo_comment"]; - } - - logTofile(debug_dump($info, "*** readInformationsFromDevice ***\n")); - - $address = $info ["wo_newparams"] ["managementAddress"]; - $community = $info ["wo_newparams"] ["snmpCommunity"]; - - if ((empty($community) || $community == "") && (empty($address) || $address == "")) { - return "Site with id " . $device_id . " was not found"; - } else if (empty($community) || $community == "") { - return "Community of site with id " . $device_id . " was not found"; - } else if (empty($address) || $address == "") { - return "Address of site with id " . $device_id . " was not found"; - } else { - return ""; - } -} - - -/* -function launchParallelSNMP($deviceId, $name, $view_type) { - global $context; - - $ubiqube_id = $context ['UBIQUBEID']; - $service_instance = $context ['SERVICEINSTANCEID']; - - $service_name = "Process/Topology/Topology"; - $process_name = "Process/Topology/Process_Call_For_Device"; - - $add_service_array = $context; - $add_service_array ['device_id'] = $deviceId; - $add_service_array ['name'] = $name; - $json_body = json_encode($add_service_array); - - _orchestration_launch_sub_process($ubiqube_id, $service_instance, $service_name, $process_name, $json_body); - - logTofile("***TOPOLOGY LAUNCH SNMP $deviceId * $name***"); -} -*/ - -?> diff --git a/Topology/Topology_Types/Template.php b/Topology/Topology_Types/Template.php deleted file mode 100755 index 97b7edeb2..000000000 --- a/Topology/Topology_Types/Template.php +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/Topology/Topology_Types/VLAN.php b/Topology/Topology_Types/VLAN.php deleted file mode 100755 index 1d699d151..000000000 --- a/Topology/Topology_Types/VLAN.php +++ /dev/null @@ -1,43 +0,0 @@ -wo_newparams->vlan)) { - $vlans = $import_result->wo_newparams->vlan; - foreach ($vlans as $vlan) { - - if (!isset($vlan->name)) { - $vlan->name = "unknown VLAN name. The Microservice VLAN requires a variable \'name\'"; - } - $vlan_id = $vlan->object_id; - logTofile("*** calculateDeviceTopology vlan_id: ".$vlan_id."\n"); - - if ($vlan_id == 1) { - createTopologyNetwork($vlan_id, $vlan_id, "network", ""); - } else { - createTopologyNetwork($vlan_id, $vlan_id, "network", ""); - } - $context ['Nodes'] [$nodePlace] ["links"] [] = $vlan_id; - } - - logTofile(debug_dump($context ['Nodes'], "*** calculateDeviceTopology Nodes ***\n")); - return false; - } else { - logTofile("WARNING: calculateDeviceTopology: managed entity ".$deviceId." has no vlan microservice attached"); - } -} -?> diff --git a/Topology/Topology_Types/VRF.php b/Topology/Topology_Types/VRF.php deleted file mode 100755 index 7b5bf286d..000000000 --- a/Topology/Topology_Types/VRF.php +++ /dev/null @@ -1,76 +0,0 @@ - $details) { - if (array_key_exists('rd', $details)) { - $vrf_rd = $details['rd']; - logTofile("*** calculateDeviceTopology vrf_rd: ".$vrf_rd."\n"); - //createTopologyNetwork($vrf_rd, $vrf_name, "network", ""); - $vrf_node_position = _topology_exist_object_this_instance($vrf_rd); - $vrf_name = $context ['Nodes'] [$vrf_node_position] ["name"]; - $context ['Nodes'] [$nodePlace] ["links"] [] = $vrf_name; - } - } - - return false; - } else { - logTofile("WARNING: calculateDeviceTopology: managed entity ".$deviceId." has no vrf microservice attached"); - } - - } - - if (strpos($name, 'CE') !== false) { - $pe_array = array(); - $list = json_decode(_lookup_list_devices_by_customer_reference($customer_ref), True); - foreach ($list['wo_newparams'] as $device => $details) { - if (strpos($details['name'], 'PE') !== false) { - $pe_array[$details['id']] = array('name' => $details['name'], 'ip' => array()); - } - - } - foreach ($pe_array as $pe_id =>&$ip_list) { - $response = json_decode(import_objects($pe_id, array('interfaces')), True); - if (array_key_exists('interfaces', $response['wo_newparams'])) { - $object_ids_array = $response['wo_newparams']['interfaces']; - foreach ($object_ids_array as $interface => $details) { - if (array_key_exists('ip_addr', $details)) { - $ip_list['ip'][] = $details['ip_addr']; - } - } - } - } - unset($pe_id, $ip_list); - $response = json_decode(import_objects($deviceId, array('bgp_neighbour')), True); - if (array_key_exists('bgp_neighbour', $response['wo_newparams'])) { - $object_ids_array = $response['wo_newparams']['bgp_neighbour']; - foreach ($object_ids_array as $neighbour => $details) { - $neighbour_ip = $details['object_id']; - foreach ($pe_array as $pe_id =>$ip_list) { - if (in_array($neighbour_ip, $ip_list['ip'])) { - $context ['Nodes'] [$nodePlace] ["links"] [] = $ip_list['name']; - } - } - } - } - } -} -?>