-
- def get_sf_list(self, filter_dict={}):
- """Obtain service functions from the VIM
- Params:
- 'filter_dict' (optional): contains the entries to filter the sfs on and only return those that match ALL:
- id: string => returns sfs with this VIM's sf ID, which implies a return of one sf at most
- name: string => returns only service functions with this name
- tenant_id: string => returns only service functions that belong to this tenant/project
- Returns a list of service function dictionaries, each dictionary contains:
- 'id': (mandatory) VIM's sf ID
- 'name': (mandatory) VIM's sf name
- 'sfis': VIM's sf's set of VIM's service function instance IDs
- 'sfc_encap': boolean stating whether this service function supports IETF SFC Encapsulation
- other VIM specific fields: (optional) whenever possible using the same naming of filter_dict param
- List can be empty if no sf matches the filter_dict. Raise an exception only upon VIM connectivity,
- authorization, or some other unspecific error
- """
- raise VimConnNotImplemented("SFC support not implemented")
-
- def delete_sf(self, sf_id):
- """Deletes (an abstract) service function from the VIM
- Returns the service function ID (sf_id) or raises an exception upon error or when sf is not found
- """
- raise VimConnNotImplemented("SFC support not implemented")
-
- def refresh_sfs_status(self, sf_list):
- """Get the status of the service functions
- Params: the list of sf identifiers
- Returns a dictionary with:
- vm_id: #VIM id of this service function
- status: #Mandatory. Text with one of:
- # DELETED (not found at vim)
- # VIM_ERROR (Cannot connect to VIM, VIM response error, ...)
- # OTHER (Vim reported other status not understood)
- # ERROR (VIM indicates an ERROR status)
- # ACTIVE,
- # CREATING (on building process)
- error_msg: #Text with VIM error message, if any. Or the VIM connection ERROR
- vim_info: #Text with plain information obtained from vim (yaml.safe_dump)
- """
- raise VimConnNotImplemented("Should have implemented this")
-
- def new_sfp(self, name, classifications, sfs, sfc_encap=True, spi=None):
- """Creates a service function path
- Params:
- 'name': name of this service function path
- 'classifications': set of traffic classifications that should be matched on to get into this sfp
- 'sfs': list of every service function that constitutes this path , from first to last
- 'sfc_encap': whether this is an SFC-Encapsulated chain (i.e using NSH), True by default
- 'spi': (optional) the Service Function Path identifier (SPI: Service Path Identifier) for this path
- Returns the VIM's sfp ID on success or raises an exception on failure
- """
- raise VimConnNotImplemented("SFC support not implemented")
-
- def get_sfp(self, sfp_id):
- """Obtain service function path details of the VIM's sfp with ID='sfp_id'
- Return a dict that contains:
- 'id': VIM's sfp ID (same as sfp_id)
- 'name': VIM's sfp name
- 'classifications': VIM's sfp's list of VIM's classification IDs
- 'sfs': VIM's sfp's list of VIM's service function IDs
- 'status': 'ACTIVE', 'INACTIVE', 'DOWN', 'BUILD', 'ERROR', 'VIM_ERROR', 'OTHER'
- 'error_msg': (optional) text that explains the ERROR status
- other VIM specific fields: (optional) whenever possible
- Raises an exception upon error or when sfp is not found
- """
- raise VimConnNotImplemented("SFC support not implemented")
-
- def get_sfp_list(self, filter_dict={}):
- """Obtain service function paths from VIM
- Params:
- 'filter_dict' (optional): contains the entries to filter the sfps on, and only return those that match ALL:
- id: string => returns sfps with this VIM's sfp ID , which implies a return of one sfp at most
- name: string => returns only sfps with this name
- tenant_id: string => returns only sfps that belong to this tenant/project
- Returns a list of service function path dictionaries, each dictionary contains:
- 'id': (mandatory) VIM's sfp ID
- 'name': (mandatory) VIM's sfp name
- 'classifications': VIM's sfp's list of VIM's classification IDs
- 'sfs': VIM's sfp's list of VIM's service function IDs
- other VIM specific fields: (optional) whenever possible using the same naming of filter_dict param
- List can be empty if no sfp matches the filter_dict. Raise an exception only upon VIM connectivity,
- authorization, or some other unspecific error
- """
- raise VimConnNotImplemented("SFC support not implemented")
-
- def refresh_sfps_status(self, sfp_list):
- """Get the status of the service function path
- Params: the list of sfp identifiers
- Returns a dictionary with:
- vm_id: #VIM id of this service function path
- status: #Mandatory. Text with one of:
- # DELETED (not found at vim)
- # VIM_ERROR (Cannot connect to VIM, VIM response error, ...)
- # OTHER (Vim reported other status not understood)
- # ERROR (VIM indicates an ERROR status)
- # ACTIVE,
- # CREATING (on building process)
- error_msg: #Text with VIM error message, if any. Or the VIM connection ERROR
- vim_info: #Text with plain information obtained from vim (yaml.safe_dump)F
- """
- raise VimConnNotImplemented("Should have implemented this")
-
- def delete_sfp(self, sfp_id):
- """Deletes a service function path from the VIM
- Returns the sfp ID (sfp_id) or raises an exception upon error or when sf is not found
- """
- raise VimConnNotImplemented("SFC support not implemented")
-
- # NOT USED METHODS in current version. Deprecated
- @deprecated
- def host_vim2gui(self, host, server_dict):
- """Transform host dictionary from VIM format to GUI format,
- and append to the server_dict
- """
- raise VimConnNotImplemented("Should have implemented this")
-
- @deprecated
- def get_hosts_info(self):
- """Get the information of deployed hosts
- Returns the hosts content"""
- raise VimConnNotImplemented("Should have implemented this")
-
- @deprecated
- def get_hosts(self, vim_tenant):
- """Get the hosts and deployed instances
- Returns the hosts content"""
- raise VimConnNotImplemented("Should have implemented this")
-
- @deprecated
- def get_processor_rankings(self):
- """Get the processor rankings in the VIM database"""
- raise VimConnNotImplemented("Should have implemented this")
-
- @deprecated
- def new_host(self, host_data):
- """Adds a new host to VIM"""
- """Returns status code of the VIM response"""
- raise VimConnNotImplemented("Should have implemented this")
-
- @deprecated
- def new_external_port(self, port_data):
- """Adds a external port to VIM"""
- """Returns the port identifier"""
- raise VimConnNotImplemented("Should have implemented this")
-
- @deprecated
- def new_external_network(self, net_name, net_type):
- """Adds a external network to VIM (shared)"""
- """Returns the network identifier"""
- raise VimConnNotImplemented("Should have implemented this")
-
- @deprecated
- def connect_port_network(self, port_id, network_id, admin=False):
- """Connects a external port to a network"""
- """Returns status code of the VIM response"""
- raise VimConnNotImplemented("Should have implemented this")
-
- @deprecated
- def new_vminstancefromJSON(self, vm_data):
- """Adds a VM instance to VIM"""
- """Returns the instance identifier"""