public IEnumerator <object[]> GetEnumerator() { yield return(new object[] { NitroCommandFactory.Create <SystemBackupCreateCommand>( new NitroServiceClient( new NitroLoginRequestData("nsroot", "nsroot"), new NitroServiceConnectionSettings( new Uri("http://localhost"), 360, NitroServiceConnectionAuthenticationMethod.AutomaticHeaderInjection), NitroHttpClientCertificateValidation.Disabled ), new SystemBackupCreateRequestData("full") { Filename = "Test", Comment = "None" } ), new Dictionary <string, string> { { "Options", "?action=create" }, { "DataRoot", "{\"systembackup\":[{\"filename\":\"Test\",\"comment\":\"None\",\"level\":\"full\"}]}" } } }); }
public IEnumerator <object[]> GetEnumerator() { yield return(new object[] { NitroCommandFactory.Create <SystemBackupAddCommand>( new NitroServiceClient( new NitroLoginRequestData("nsroot", "nsroot"), new NitroServiceConnectionSettings( new Uri("http://localhost"), 360, NitroServiceConnectionAuthenticationMethod.AutomaticHeaderInjection), NitroHttpClientCertificateValidation.Disabled ), new SystemBackupAddRequestData("testfile") { } ), new Dictionary <string, string>() { { "Options", string.Empty }, { "DataRoot", "{\"systembackup\":[{\"filename\":\"testfile\"}]}" } } }); }
private async Task <SystemBackupGetResponse> ListBackupOnNode() { var systemBackupGetCommand = NitroCommandFactory.Create <SystemBackupGetCommand>( _nitroServiceClient); var result = await systemBackupGetCommand.GetResponse(); return(result); }
public IEnumerator <object[]> GetEnumerator() { yield return(new object[] { NitroCommandFactory.Create <SystemFileGetCommand>( new NitroServiceClient( new NitroLoginRequestData("nsroot", "nsroot"), new NitroServiceConnectionSettings( new Uri("http://localhost"), 360, NitroServiceConnectionAuthenticationMethod.AutomaticHeaderInjection), NitroHttpClientCertificateValidation.Disabled ), new SystemFileGetRequestOptions() { } ), new Dictionary <string, string> { { "Options", "" }, { "DataRoot", "" } } }); yield return(new object[] { NitroCommandFactory.Create <SystemFileGetCommand>( new NitroServiceClient( new NitroLoginRequestData("nsroot", "nsroot"), new NitroServiceConnectionSettings( new Uri("http://localhost"), 360, NitroServiceConnectionAuthenticationMethod.AutomaticHeaderInjection), NitroHttpClientCertificateValidation.Disabled ), new SystemFileGetRequestOptions() { PropertyFilter = { "filter" }, Count = true } ), new Dictionary <string, string> { { "Options", "?count=yes&attrs=filter" }, { "DataRoot", "" } } }); }
public IEnumerator <object[]> GetEnumerator() { yield return(new object[] { NitroCommandFactory.Create <SystemFileRemoveCommand>( new NitroServiceClient( new NitroLoginRequestData("nsroot", "nsroot"), new NitroServiceConnectionSettings( new Uri("http://localhost"), 360, NitroServiceConnectionAuthenticationMethod.AutomaticHeaderInjection), NitroHttpClientCertificateValidation.Disabled ), new SystemFileRemoveRequestOptions("test.tgz") { } ), new Dictionary <string, string> { { "Options", "/test.tgz" }, { "DataRoot", string.Empty } } }); }