def loadbalancer_delete(self, loadbalancer, cascade=False): if cascade: # TODO(asarfaty) add support for cascade LOG.warning("The NSX Octavia driver does not support loadbalancer " "delete cascade") raise exceptions.NotImplementedError() kw = {'loadbalancer': self.obj_to_dict(loadbalancer), 'cascade': cascade} self.client.cast({}, 'loadbalancer_delete', **kw)
def pool_delete(self, pool_id): """Deletes a pool and its members. :param pool_id: ID of the pool to delete. :type pool_id: string :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. """ raise exceptions.NotImplementedError()
def l7rule_delete(self, l7rule_id): """Deletes an L7 rule. :param l7rule_id: ID of the L7 rule to delete. :type l7rule_id: string :return: Nothing if the delete request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. """ raise exceptions.NotImplementedError()
def loadbalancer_failover(self, loadbalancer_id): """Performs a fail over of a load balancer. :param loadbalancer_id: ID of the load balancer to failover. :type loadbalancer_id: string :return: Nothing if the failover request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises: NotImplementedError if driver does not support request. """ raise exceptions.NotImplementedError()
def test_NotImplementedError(self): not_implemented_error = exceptions.NotImplementedError( user_fault_string=self.user_fault_string, operator_fault_string=self.operator_fault_string) self.assertEqual(self.user_fault_string, not_implemented_error.user_fault_string) self.assertEqual(self.operator_fault_string, not_implemented_error.operator_fault_string) self.assertIsInstance(not_implemented_error, Exception)
def health_monitor_delete(self, healthmonitor_id): """Deletes a healthmonitor_id. :param healthmonitor_id: ID of the monitor to delete. :type healthmonitor_id: string :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. """ raise exceptions.NotImplementedError()
def get_supported_flavor_metadata(self): """Returns a dict of flavor metadata keys supported by this driver. The returned dictionary will include key/value pairs, 'name' and 'description.' :returns: The flavor metadata dictionary :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: The driver does not support flavors. """ raise exceptions.NotImplementedError()
def member_batch_update(self, members): """Creates, updates, or deletes a set of pool members. :param members: List of member objects. :type members: list :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. :raises UnsupportedOptionError: if driver does not support one of the configuration options. """ raise exceptions.NotImplementedError()
def pool_update(self, pool): """Updates a pool. :param pool: The pool object. :type pool: object :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. :raises UnsupportedOptionError: if driver does not support one of the configuration options. """ raise exceptions.NotImplementedError()
def validate_flavor(self, flavor_metadata): """Validates if driver can support the flavor. :param flavor_metadata: Dictionary with flavor metadata. :type flavor_metadata: dict :return: Nothing if the flavor is valid and supported. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: The driver does not support flavors. :raises UnsupportedOptionError: if driver does not support one of the configuration options. """ raise exceptions.NotImplementedError()
def listener_create(self, listener): """Creates a new listener. :param listener: The listener object. :type listener: object :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. :raises UnsupportedOptionError: if driver does not support one of the configuration options. """ raise exceptions.NotImplementedError()
def l7rule_update(self, l7rule): """Updates an L7 rule. :param l7rule: The L7 rule object. :type l7rule: object :return: Nothing if the update request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. :raises UnsupportedOptionError: if driver does not support one of the configuration options. """ raise exceptions.NotImplementedError()
def health_monitor_update(self, healthmonitor): """Updates a health monitor. :param healthmonitor: The health monitor object. :type healthmonitor: object :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. :raises UnsupportedOptionError: if driver does not support one of the configuration options. """ raise exceptions.NotImplementedError()
def loadbalancer_update(self, loadbalancer): """Updates a load balancer. :param loadbalancer: The load balancer object. :type loadbalancer: object :return: Nothing if the update request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: The driver does not support request. :raises UnsupportedOptionError: The driver does not support one of the configuration options. """ raise exceptions.NotImplementedError()
def loadbalancer_delete(self, loadbalancer_id, cascade=False): """Deletes a load balancer. :param loadbalancer_id: ID of the load balancer to delete. :type loadbalancer_id: string :param cascade: If True, deletes all child objects (listeners, pools, etc.) in addition to the load balancer. :type cascade: bool :return: Nothing if the delete request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. """ raise exceptions.NotImplementedError()
def listener_delete(self, listener): """Deletes a listener. :param listener: The listener to delete. :type listener: object :return: Nothing if the delete request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support deleting ' 'listeners.', operator_fault_string='This provider does not support deleting ' 'listeners.')
def health_monitor_delete(self, healthmonitor): """Deletes a healthmonitor_id. :param healthmonitor: The monitor to delete. :type healthmonitor: object :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support deleting ' 'health monitors.', operator_fault_string='This provider does not support deleting ' 'health monitors.')
def pool_delete(self, pool): """Deletes a pool and its members. :param pool: The pool to delete. :type pool: object :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support deleting ' 'pools.', operator_fault_string='This provider does not support deleting ' 'pools.')
def loadbalancer_extension(self, loadbalancer_id): """Performs a extension of a load balancer. :param loadbalancer_id: ID of the load balancer to failover. :type loadbalancer_id: string :return: Nothing if the failover request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises: NotImplementedError if driver does not support request. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support extending ' 'load balancers.', operator_fault_string='This provider does not support ' 'extending load balancers.')
def l7policy_delete(self, l7policy_id): """Deletes an L7 policy. :param l7policy_id: ID of the L7 policy to delete. :type l7policy_id: string :return: Nothing if the delete request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support deleting ' 'l7policies.', operator_fault_string='This provider does not support deleting ' 'l7policies.')
def member_delete(self, member_id): """Deletes a pool member. :param member_id: ID of the member to delete. :type member_id: string :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support deleting ' 'members.', operator_fault_string='This provider does not support deleting ' 'members.')
def get_supported_flavor_metadata(self): """Returns a dict of flavor metadata keys supported by this driver. The returned dictionary will include key/value pairs, 'name' and 'description.' :returns: The flavor metadata dictionary :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: The driver does not support flavors. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support getting the ' 'supported flavor metadata.', operator_fault_string='This provider does not support getting ' 'the supported flavor metadata.')
def loadbalancer_create(self, loadbalancer): """Creates a new load balancer. :param loadbalancer: The load balancer object. :type loadbalancer: object :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: The driver does not support create. :raises UnsupportedOptionError: The driver does not support one of the configuration options. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support creating ' 'load balancers.', operator_fault_string='This provider does not support creating ' 'load balancers. What?')
def l7rule_create(self, l7rule): """Creates a new L7 rule. :param l7rule: The L7 rule object. :type l7rule: object :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. :raises UnsupportedOptionError: if driver does not support one of the configuration options. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support creating ' 'l7rules.', operator_fault_string='This provider does not support creating ' 'l7rules.')
def l7policy_update(self, l7policy): """Updates an L7 policy. :param l7policy: The l7policy object. :type l7policy: object :return: Nothing if the update request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. :raises UnsupportedOptionError: if driver does not support one of the configuration options. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support updating ' 'l7policies.', operator_fault_string='This provider does not support updating ' 'l7policies.')
def health_monitor_create(self, healthmonitor): """Creates a new health monitor. :param healthmonitor: The health monitor object. :type healthmonitor: object :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. :raises UnsupportedOptionError: if driver does not support one of the configuration options. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support creating ' 'health monitors.', operator_fault_string='This provider does not support creating ' 'health monitors.')
def member_update(self, member): """Updates a pool member. :param member: The member object. :type member: object :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. :raises UnsupportedOptionError: if driver does not support one of the configuration options. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support updating ' 'members.', operator_fault_string='This provider does not support updating ' 'members.')
def loadbalancer_delete(self, loadbalancer, cascade=False): """Deletes a load balancer. :param loadbalancer: The load balancer to delete. :type loadbalancer: object :param cascade: If True, deletes all child objects (listeners, pools, etc.) in addition to the load balancer. :type cascade: bool :return: Nothing if the delete request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support deleting ' 'load balancers.', operator_fault_string='This provider does not support deleting ' 'load balancers.')
def create_vip_port(self, loadbalancer_id, vip_dictionary): """Creates a port for a load balancer VIP. If the driver supports creating VIP ports, the driver will create a VIP port and return the vip_dictionary populated with the vip_port_id. If the driver does not support port creation, the driver will raise a NotImplementedError. :param loadbalancer_id: ID of loadbalancer. :type loadbalancer_id: string :param: vip_dictionary: The VIP dictionary. :type vip_dictionary: dict :returns: VIP dictionary with vip_port_id. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: The driver does not support creating VIP ports. """ raise exceptions.NotImplementedError()
def pool_update(self, old_pool, new_pool): """Updates a pool. :param pool: The baseline pool object. :type pool: object :param pool: The updated pool object. :type pool: object :return: Nothing if the create request was accepted. :raises DriverError: An unexpected error occurred in the driver. :raises NotImplementedError: if driver does not support request. :raises UnsupportedOptionError: if driver does not support one of the configuration options. """ raise exceptions.NotImplementedError( user_fault_string='This provider does not support updating ' 'pools.', operator_fault_string='This provider does not support updating ' 'pools.')