Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/c/l/cloudbase-init-HEAD/cloudbaseinit/plugins/windows/winrmcertificateauth.py   cloudbase-init(Download)
    def _get_credentials(self, shared_data):
        user_name = shared_data.get(constants.SHARED_DATA_USERNAME)
        if not user_name:
            raise Exception("Cannot execute plugin as the username has "
                            "not been set in the plugins shared data")

src/c/l/cloudbase-init-HEAD/cloudbaseinit/plugins/windows/setuserpassword.py   cloudbase-init(Download)
    def execute(self, service, shared_data):
        # TODO(alexpilotti): The username selection logic must be set in the
        # CreateUserPlugin instead if using CONF.username
        user_name = shared_data.get(constants.SHARED_DATA_USERNAME,
                                    CONF.username)

src/c/l/cloudbase-init-HEAD/cloudbaseinit/plugins/windows/createuser.py   cloudbase-init(Download)
    def execute(self, service, shared_data):
        user_name = CONF.username
        shared_data[constants.SHARED_DATA_USERNAME] = user_name
 
        osutils = osutils_factory.get_os_utils()

src/c/l/cloudbase-init-HEAD/cloudbaseinit/tests/plugins/windows/test_winrmcertificateauth.py   cloudbase-init(Download)
        else:
            response = self._certif_auth._get_credentials(mock_shared_data)
            expected = [mock.call(constants.SHARED_DATA_USERNAME),
                        mock.call(constants.SHARED_DATA_PASSWORD)]
            self.assertEqual(mock_shared_data.get.call_args_list, expected)

src/c/l/cloudbase-init-HEAD/cloudbaseinit/tests/plugins/windows/test_setuserpassword.py   cloudbase-init(Download)
        mock_get_os_utils.assert_called_once_with()
        fake_shared_data.get.assert_called_with(
            constants.SHARED_DATA_USERNAME, CONF.username)
        mock_osutils.user_exists.assert_called_once_with('fake username')
        mock_set_password.assert_called_once_with(mock_service, mock_osutils,