def __init__(self, hostname, username, password, timeout=60, optional_args=None):
        """
        Supported optional_args:
            * path(str) - path to where the mocked files are located
            * profile(list) - List of profiles to assign
        """
        self.hostname = hostname
        self.username = username
        self.password = password
        self.path = optional_args["path"]
        self.profile = optional_args.get("profile", [])
        self.fail_on_open = optional_args.get("fail_on_open", False)

        self.opened = False
        self.calls = {}
        self.device = MockDevice(self, self.profile)

        # None no action, True load_merge, False load_replace
        self.merge = None
        self.filename = None
        self.config = None
def __init__ ( self , hostname , username , password , timeout = 60 , optional_args = None ) : self . hostname = hostname self . username = username self . password = password self . path = optional_args [ "path" ] self . profile = optional_args . get ( "profile" , [ ] ) self . fail_on_open = optional_args . get ( "fail_on_open" , False ) self . opened = False self . calls = { } self . device = MockDevice ( self , self . profile ) self . merge = None self . filename = None self . config = None
Supported optional_args:
            * path(str) - path to where the mocked files are located
            * profile(list) - List of profiles to assign