Utilisez les appels d'API pour mettre à niveau une machine virtuelle de service est-ouest.

Conditions préalables

Procédure

  1. Utilisez l'API suivante pour récupérer la charge utile du service est-ouest.
    GET https://<nsx-manager>/api/v1/serviceinsertion/services/<ew_service_id>
    Response:
    {
    "functionalities": [
    "NET_MON",
    "NG_FW"
    ],q
    "implementations": [
    "EAST_WEST"
    ],
    "attachment_point": [
    "SERVICE_PLANE"
    ],
    "transports": [
    "NSH"
    ],
    "on_failure_policy": "BLOCK",
    "service_deployment_spec": {
    "deployment_template": [
    {
    "name": "EW_DepTemp",
    "attributes": [
    {
    "key": "password",
    "display_name": "password",
    "attribute_type": "PASSWORD",
    "read_only": false
    },
    {
    "key": "LicenseKey",
    "display_name": "License",
    "attribute_type": "STRING",
    "read_only": false
    }
    ]
    }
    ],
    "deployment_specs": [
    {
    "name": "EW_DepSpec",
    "ovf_url": "http://<server-FQDN/IP>/ovfs/nsxt/EastWest/v2/EW_SI_SVM_v2.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": 0,
    "interface_type": "MANAGEMENT",
    "user_configurable": true
    },
    {
    "interface_label": "eth",
    "interface_index": 1,
    "interface_type": "DATA1"
    }
    ],
    "svm_version": "1.0"
    },
    "vendor_id": "ABC_Service",
    "service_capability": {
    "nsh_liveness_support_enabled": true,
    "can_decrement_si": false
    },
    "resource_type": "ServiceDefinition",
    "id": "2cb0efaa-beb1-461b-be2b-d94afee98692",
    "display_name": "ABC_Service",
    "description": "This is East West Service Insertion",
    "_create_user": "admin",
    "_create_time": 1614099564224,
    "_last_modified_user": "admin",
    "_last_modified_time": 1614104390834,
    "_system_owned": false,
    "_protection": "NOT_PROTECTED",
    "_revision": 1
    }
  2. Mettez à jour la spécification de déploiement de service est-ouest. L'appel d'API suivant ajoute quelques spécifications de déploiement supplémentaires à la charge utile.
    PUT https://<nsx-manager>/api/v1/serviceinsertion/services/<ew_service_id>
    {
    "functionalities": [
    "NET_MON",
    "NG_FW"
    ],
    "implementations": [
    "EAST_WEST"
    ],
    "attachment_point": [
    "SERVICE_PLANE"
    ],
    "transports": [
    "NSH"
    ],
    "on_failure_policy": "BLOCK",
    "service_deployment_spec": {
    "deployment_template": [
    {
    "name": "EW_DepTemp",
    "attributes": [
    {
    "key": "password",
    "display_name": "password",
    "attribute_type": "PASSWORD",
    "read_only": false
    },
    {
    "key": "LicenseKey",
    "display_name": "License",
    "attribute_type": "STRING",
    "read_only": false
    }
    ]
    }
    ],
    "deployment_specs": [
    {
    "name": "EW_DepSpec_up2",
    "ovf_url": "http://<server-FQDN/IP>/OVAs/SVM-tiny-64_3/SVM-tiny-64/SVM-tiny-64.ovf",
    "min_host_version": "6.5",
    "host_type": "ESXI",
    "service_form_factor": "SMALL",
    "svm_version": "1.0"
    },
    {
    "name": "EW_DepSpec",
    "ovf_url": "http://<server-FQDN/IP>/ovfs/nsxt/EastWest/v2/EW_SI_SVM_v2.ovf",
    "min_host_version": "6.5",
    "host_type": "ESXI",
    "service_form_factor": "MEDIUM",
    "svm_version": "1.0"
    },
    {
    "name": "EW_DepSpec_up",
    "ovf_url": "http://<server-FQDN/IP>/EW_OVF/EW_SI_SVM.ovf",
    "min_host_version": "6.5",
    "host_type": "ESXI",
    "service_form_factor": "LARGE",
    "svm_version": "1.0"
    }
    ],
    "nic_metadata_list": [
    {
    "interface_label": "eth",
    "interface_index": 0,
    "interface_type": "MANAGEMENT",
    "user_configurable": true
    },
    {
    "interface_label": "eth",
    "interface_index": 1,
    "interface_type": "DATA1"
    }
    ],
    "svm_version": "1.0"
    },
    "vendor_id": "ABC_Service",
    "service_capability": {
    "nsh_liveness_support_enabled": true,
    "can_decrement_si": false
    },
    "resource_type": "ServiceDefinition",
    "id": "2cb0efaa-beb1-461b-be2b-d94afee98692",
    "display_name": "ABC_Service",
    "description": "This is East West Service Insertion",
    "_create_user": "admin",
    "_create_time": 1614099564224,
    "_last_modified_user": "admin",
    "_last_modified_time": 1614104390834,
    "_system_owned": false,
    "_protection": "NOT_PROTECTED",
    "_revision": 1
    }
  3. Appelez l'API suivante pour mettre à niveau les machines virtuelles de service appartenant au déploiement de service est-ouest. NSX-T met à niveau la machine virtuelle de service est-ouest associée au déploiement de service spécifié.
    POST https://<nsx-manager>/api/v1/serviceinsertion/services/<ew_service_id>/service-deployments/<service_deployment_id>?action=upgrade
    {
    "deployment_spec_name": "EW_DepSpec_up2"
    }

Résultats

NSX-T met à niveau la machine virtuelle du service est-ouest.