lib.sqlalchemy.update_network_service_scanning_status_op - python examples

Here are the examples of the python api lib.sqlalchemy.update_network_service_scanning_status_op taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

0 View Complete Implementation : base.py
Copyright GNU General Public License v3.0
Author : lavalamp-
@websight_app.task(bind=True, base=ScanTask)
def update_network_service_scanning_status(
        self,
        network_service_uuid=None,
        scanning_status=None,
        order_uuid=None,
):
    """
    Update the current scanning status of the given network service to the given value.
    :param network_service_uuid: The UUID of the network service to update.
    :param scanning_status: The status to set the scanning status to.
    :return: None
    """
    logger.info(
        "Now updating scanning status for network service %s to %s."
        % (network_service_uuid, scanning_status)
    )
    update_network_service_scanning_status_op(
        status=scanning_status,
        service_uuid=network_service_uuid,
        db_session=self.db_session,
    )
    self.db_session.commit()
    logger.info(
        "Scanning status for network service %s successfully updated to %s."
        % (network_service_uuid, scanning_status)
    )