private bool TestSqosVersion(string share, SQOS_PROTOCOL_VERSION version) { using (SqosClient client = new SqosClient(new TimeSpan(0, 0, defaultTimeoutInSeconds))) { client.ConnectToVHD( SUTName, SUTIpAddress, Credential.DomainName, Credential.AccountName, Credential.Password, SecurityPackageType, true, share, vhdName); SqosRequestPacket sqosRequest = new SqosRequestPacket(version == SQOS_PROTOCOL_VERSION.Sqos10 ? SqosRequestType.V10 : SqosRequestType.V11, (ushort)version, SqosOptions_Values.STORAGE_QOS_CONTROL_FLAG_SET_LOGICAL_FLOW_ID | SqosOptions_Values.STORAGE_QOS_CONTROL_FLAG_GET_STATUS, Guid.NewGuid(), Guid.Empty, Guid.Empty, string.Empty, string.Empty ); SqosResponsePacket sqosResponse; uint status = client.SendAndReceiveSqosPacket( sqosRequest, out sqosResponse); if (status != Smb2Status.STATUS_SUCCESS) { return(false); } return((ushort)version == sqosResponse.Header.ProtocolVersion); } }
protected void ConnectToVHD() { BaseTestSite.Log.Add(LogEntryKind.TestStep, "Client creates an Open to a VHDX file by sending the following requests: NEGOTIATE; SESSION_SETUP; TREE_CONNECT; CREATE"); client.ConnectToVHD( TestConfig.FileServerNameContainingSharedVHD, TestConfig.FileServerIPContainingSharedVHD, TestConfig.DomainName, TestConfig.UserName, TestConfig.UserPassword, TestConfig.DefaultSecurityPackage, TestConfig.UseServerGssToken, TestConfig.ShareContainingSharedVHD, TestConfig.NameOfSharedVHD); }