Example #1
0
class DSSInteractHandler(BaseOptHandler):
    """Option handler for actions that interact with the DSS."""
    def __init__(self, params, **kwargs):
        """Initialize a new instance."""
        super(DSSInteractHandler, self).__init__(params, **kwargs)
        self.client = None

    def __enter__(self):
        """Initialize a DSS Client."""
        self.client = DSSClient()
        self.client.connect()
        return self

    def __exit__(self, exc_type, exc_value, traceback):
        """Release resources associated to a DSS handle."""
        self.client.disconnect()
Example #2
0
 def test_client_connect(self): # pylint: disable=no-self-use
     """Connect to backend with valid parameters."""
     cli = Client()
     cli.connect()
     cli.disconnect()
Example #3
0
 def test_client_connect(self):
     """Connect to backend with valid parameters."""
     cli = Client()
     cli.connect()
     cli.disconnect()