Utilice las llamadas de API para actualizar una máquina virtual de servicio norte-sur.
Requisitos previos
Procedimiento
- Utilice la siguiente API para recuperar la carga útil de la implementación del servicio de norte a sur.
GET https://<nsx-manager>/api/v1/serviceinsertion/services/<ns_service_id>
{ "functionalities": [ "NG_FW" ], "implementations": [ "NORTH_SOUTH" ], "attachment_point": [ "TIER1_LR", "TIER0_LR" ], "transports": [ "L2_BRIDGE" ], "on_failure_policy": "BLOCK", "service_deployment_spec": { "deployment_template": [ { "name": "NS_DepTemp", "attributes": [ { "key": "LicenseKey", "display_name": "License", "attribute_type": "STRING", "read_only": false } ] } ], "deployment_specs": [ { "name": "NS_DepSpec", "ovf_url": "http://<server-FQDN/IP>/ovfs/nsxt/NorthSouth/v1/PA-VM-NST-8.1.3-c15.ovf", "min_host_version": "6.5", "host_type": "ESXI", "service_form_factor": "MEDIUM", "svm_version": "1.0" } ], "nic_metadata_list": [ { "interface_label": "eth", "interface_index": 2, "interface_type": "DATA2" }, { "interface_label": "eth", "interface_index": 0, "interface_type": "MANAGEMENT", "user_configurable": true }, { "interface_label": "eth", "interface_index": 1, "interface_type": "DATA1" }, { "interface_label": "eth", "interface_index": 4, "interface_type": "HA2" }, { "interface_label": "eth", "interface_index": 3, "interface_type": "HA1" } ] }, "vendor_id": "ABC_Service", "resource_type": "ServiceDefinition", "id": "9ea92ea7-a6b0-4640-9c28-5b364713e8c0", "display_name": "NS Service_automation", "description": "This service is inserted at T0 & T1 router and it provides advanced security", "_create_user": "admin", "_create_time": 1614099580424, "_last_modified_user": "admin", "_last_modified_time": 1614099580424, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }
- Actualice la especificación de implementación del servicio. En esta llamada, las instancias de implementación se actualizan con NS_Deployment_Specfication_11 y NS_Deployment_Specfication_12.
PUT https://<nsx-manager>/api/v1/serviceinsertion/services/<ns_service_id>
{ "functionalities": [ "NG_FW" ], "implementations": [ "NORTH_SOUTH" ], "attachment_point": [ "TIER1_LR", "TIER0_LR" ], "transports": [ "L2_BRIDGE" ], "on_failure_policy": "BLOCK", "service_deployment_spec": { "deployment_template": [ { "name": "NS_DepTemp", "attributes": [ { "key": "LicenseKey", "display_name": "License", "attribute_type": "STRING", "read_only": false } ] } ], "deployment_specs": [ { "name": "NS_Deployment_Specfication_11", "ovf_url": "http://<server-FQDN/IP>/ovfs/nsxt/NorthSouth/v1/PA-VM-NST-8.1.3-c15.ovf", "host_type": "ESXI" }, { "name": "NS_Deployment_Specfication_12", "ovf_url": "http://<server-FQDN/IP>/ovfs/nsxt/NorthSouth/v1/PA-VM-NST-8.1.3-c15.ovf", "host_type": "ESXI" } ], "nic_metadata_list": [ { "interface_label": "eth", "interface_index": 2, "interface_type": "DATA2" }, { "interface_label": "eth", "interface_index": 0, "interface_type": "MANAGEMENT", "user_configurable": true }, { "interface_label": "eth", "interface_index": 1, "interface_type": "DATA1" }, { "interface_label": "eth", "interface_index": 4, "interface_type": "HA2" }, { "interface_label": "eth", "interface_index": 3, "interface_type": "HA1" } ] }, "vendor_id": "ABC_Service", "resource_type": "ServiceDefinition", "id": "9ea92ea7-a6b0-4640-9c28-5b364713e8c0", "display_name": "NS Service_automation", "description": "This service is inserted at T0 & T1 router and it provides advanced security", "_create_user": "admin", "_create_time": 1614099580424, "_last_modified_user": "admin", "_last_modified_time": 1614099580424, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }
- Actualice el nombre de la especificación de implementación de la instancia de servicio de nivel 0 a NS_Deployment_Specfication_12. Para actualizar la especificación, utilice la respuesta devuelta por la llamada GET (paso anterior) e introduzca la misma en la siguiente llamada PATCH con deployment_spec_name: NS_Deployment_Specfication_12. NSX-T Data Center actualiza la máquina virtual de servicio de nivel 0.
PATCH https://<nsx-manager>/policy/api/v1/infra/tier-0s/<tier0_LR_id>/locale-services/<tier0_localeservice_id>/service-instances/<tier0_serviceinstance_id>
{ "context_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca", "compute_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca:domain-c16", "storage_id": "datastore-13", "primary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT", "primary_interface_mgmt_ip": "10.161.154.2", "secondary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT", "secondary_interface_mgmt_ip": "10.161.154.3", "deployment_spec_name": "NS_Deployment_Specfication_12", "failure_policy": "BLOCK", "deployment_template_name": "NS_DepTemp", "attributes": [ { "key": "LicenseKey", "display_name": "License", "value": "adklfjakldfjlkajfkl", "attribute_type": "STRING", "read_only": false } ], "resource_type": "PolicyServiceInstance", "id": "PAN-1", "display_name": "PAN-1", "path": "/infra/tier-0s/Tier0-LR-1/locale-services/tier0localservices/service-instances/PAN-1", "relative_path": "PAN-1", "parent_path": "/infra/tier-0s/Tier0-LR-1/locale-services/tier0localservices", "unique_id": "5500a8e4-255b-4131-9da2-9a9a2be21b32", "marked_for_delete": false, "overridden": false, "partner_service_name": "NS Service_automation", "deployment_mode": "ACTIVE_STANDBY", "transport_type": "L2_BRIDGE", "_create_user": "admin", "_create_time": 1614099590522, "_last_modified_user": "admin", "_last_modified_time": 1614099590527, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }
- Actualice la especificación de implementación de la instancia de servicio del enrutador lógico de nivel 1 a NS_Deployment_Specfication_12. Para ello, puede utilizar la respuesta devuelta por la llamada GET y enviar la misma a la llamada PATCH con deployment_spec_name: NS_Deployment_Specfication_12. NSX-T Data Center actualiza la máquina virtual de servicio de puerta de enlace de nivel 1.
PATCH https://<nsx-manager>/policy/api/v1/infra/tier-1s/<tier1_LR_id>/locale-services/<tier1_LR1_localeservice_id>/service-instances/<tier1_LR1_serviceinstance_id>
{ "context_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca", "compute_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca:domain-c16", "storage_id": "datastore-13", "primary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT", "primary_interface_mgmt_ip": "10.161.154.4", "secondary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT", "secondary_interface_mgmt_ip": "10.161.154.5", "deployment_spec_name": "NS_Deployment_Specfication_12", "failure_policy": "BLOCK", "deployment_template_name": "NS_DepTemp", "attributes": [ { "key": "LicenseKey", "display_name": "License", "value": "adklfjakldfjlkajfkl", "attribute_type": "STRING", "read_only": false } ], "resource_type": "PolicyServiceInstance", "id": "PAN-1-tier-1", "display_name": "PAN-1-tier-1", "path": "/infra/tier-1s/TIER-1-LR-1/locale-services/1-policyconnectivity-1284/service-instances/PAN-1-tier-1", "relative_path": "PAN-1-tier-1", "parent_path": "/infra/tier-1s/TIER-1-LR-1/locale-services/1-policyconnectivity-1284", "unique_id": "4bd48611-3257-4895-8295-c49fdfa644b3", "marked_for_delete": false, "overridden": false, "partner_service_name": "NS Service_automation", "deployment_mode": "ACTIVE_STANDBY", "transport_type": "L2_BRIDGE", "_create_user": "admin", "_create_time": 1614099595487, "_last_modified_user": "admin", "_last_modified_time": 1614099595489, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }
- Actualice la especificación de implementación de la instancia de servicio de la ruta lógica de nivel 1 a NS_Deployment_Specfication_12. Para actualizar la especificación de implementación, utilice la respuesta devuelta por la llamada GET (paso anterior) y pegue la misma en la siguiente llamada PATCH con deployment_spec_name: NS_Deployment_Specfication_12. NSX-T Data Center actualiza la máquina virtual del servicio del enrutador lógico de nivel 1.
PATCH https://<nsx-manager>/policy/api/v1/infra/tier-1s/<tier1_LR2_id>/locale-services/<tier1_LR2_localeservice_id>/service-instances/<tier1_LR2_serviceinstance_id>
{ "context_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca", "compute_id": "b75193d1-137c-45c2-83b3-8f9d7795ddca:domain-c16", "storage_id": "datastore-13", "primary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT", "primary_interface_mgmt_ip": "10.161.154.6", "secondary_interface_network": "/infra/tier-1s/TIER-1-LR-1/segments/SI_SEGMENT", "secondary_interface_mgmt_ip": "10.161.154.7", "deployment_spec_name": "NS_Deployment_Specfication_12", "failure_policy": "BLOCK", "deployment_template_name": "NS_DepTemp", "attributes": [ { "key": "LicenseKey", "display_name": "License", "value": "adklfjakldfjlkajfkl", "attribute_type": "STRING", "read_only": false } ], "resource_type": "PolicyServiceInstance", "id": "PAN-2-tier-1", "display_name": "PAN-2-tier-1", "path": "/infra/tier-1s/TIER-1-LR-2/locale-services/2-policyconnectivity-1359/service-instances/PAN-2-tier-1", "relative_path": "PAN-2-tier-1", "parent_path": "/infra/tier-1s/TIER-1-LR-2/locale-services/2-policyconnectivity-1359", "unique_id": "eb9e61e7-edc3-4c29-93cc-d3c4eeb4a6c7", "marked_for_delete": false, "overridden": false, "partner_service_name": "NS Service_automation", "deployment_mode": "ACTIVE_STANDBY", "transport_type": "L2_BRIDGE", "_create_user": "admin", "_create_time": 1614099599703, "_last_modified_user": "admin", "_last_modified_time": 1614099599705, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }