您可以使用以下 config.yaml 示例作为参考。

# NSX Manager IP address
mgr_ip: null
 
# NSX Manager username, ignored if nsx_api_cert_file is set
username: "username"
 
# NSX Manager password, ignored if nsx_api_cert_file is set
password: "password"
 
# Principal Identity used to import the NSX resource
principal_identity: "admin"
 
# Path to NSX client certificate file. If specified, the username and
# password options will be ignored. Must be specified along with
# nsx_api_private_key_file option
# nsx_api_cert_file: /root/nsx-ujo/sample_scripts/com.vmware.nsx.ncp/nsx.crt
 
# Path to NSX client private key file. If specified, the username and
# password options will be ignored. Must be specified along with
# nsx_api_cert_file option
# nsx_api_private_key_file: /root/nsx-ujo/sample_scripts/com.vmware.nsx.ncp/nsx.key
 
# Specify one or a list of CA bundle files to use in verifying the NSX
# Manager server certificate. This option is ignored if "allow_insecure"
# is set to True. If "allow_insecure" is set to False and ca_file
# is unset, the system root CAs will be used to verify the server
# certificate
# ca_file: None
 
# Import only the shared resources
# To import a cluster, this flag must be set to False
import_shared_resources_only: True
 
# If true, all the imported MP to Policy resources will be rollbacked
# Default=False
rollback_imported_resources: False
 
# Name of the Kubernetes clusters to be imported, optional.
# Can be specified to import only specific K8s clusters from the
# ones specified under user-spec.yaml
# If not specified, all the clusters will be imported
k8s_cluster_names:
  - k8scluster
 
# Name of the directory that records the IDs of resources
# that are successfully imported
# Default=successfull_records
# records_dir_name: successfull_records
 
# Path where the records of successfully imported resources are
# saved. You can use this in conjunction with records_dir_name
# By default, we use the current working directory
# records_dir_base_path: None
 
# YAML config file that stores the information of resources
# to be imported
user_spec_file: "/root/nsx-ujo/sample_scripts/mp_to_policy_import/user-spec.yaml"
 
# Disable urllib's insecure request warning
# Default=False
no_warning: False
 
# If true, the NSX Manager server certificate is not verified. If false the
# CA bundle specified via "ca_file" will be used or if unset the default
# system root CAs will be used
# Default=False
allow_insecure: False
 
# Enable the debug logs
# Default=False
enable_debug_logs: False
 
# Do not print the logs on the console.
# Can be used with logging enabled to a file.
# Default=False
# disable_console_logs: False
 
# Output the logs to this file.
# Default=/var/log/nsx-ujo/mp_to_policy_import.log
# log_file: /var/log/nsx-ujo/mp_to_policy_import.log