2020-08-19 Fred Gleason <fredg@paravelsystems.com>

* Added a 'STATIONS.SSH_IDENTITY_FILE' field to the database.
	* Added a 'RECORDINGS.URL_USE_ID_FILE' field to the database.
	* Added a 'FEEDS.PURGE_USE_ID_FILE' field to the database.
	* Incremented the database version to 333.
	* Added 'RDStation::sshIdentityFile()' and
	'RDStation::setSshIdentityFile()' methods.
	* Added 'RDRecording::urlUseIdFile()' and
	'RDRecording::setUrlUseIdFile()' methods.
	* Added 'RDFeed::purgeUseIdFile()' and 'RDFeed::setPurgeUseIdFile()'
	methods.
	* Added a 'SSH Ident. File' control to the 'Host' dialog in
	rdadmin(1).
	* Added an 'Authenticate with local identity file' checkbox to
	the 'Feed' dialog in rdadmin(1).

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2020-08-19 10:44:41 -04:00
parent afb3832f72
commit ecd2a2d427
42 changed files with 495 additions and 149 deletions

View File

@@ -36,6 +36,7 @@ MainObject::MainObject(QObject *parent)
username="";
password="";
RDDelete::ErrorCode conv_err;
use_identity_file=false;
//
// Open the Database
@@ -58,6 +59,14 @@ MainObject::MainObject(QObject *parent)
password=rda->cmdSwitch()->value(i);
rda->cmdSwitch()->setProcessed(i,true);
}
if(rda->cmdSwitch()->key(i)=="--ssh-identity-filename") {
ssh_identity_filename=rda->cmdSwitch()->value(i);
rda->cmdSwitch()->setProcessed(i,true);
}
if(rda->cmdSwitch()->key(i)=="--use-identity-file") {
use_identity_file=true;
rda->cmdSwitch()->setProcessed(i,true);
}
if(rda->cmdSwitch()->key(i)=="--target-url") {
target_url=QUrl(rda->cmdSwitch()->value(i));
if(target_url.isRelative()) {
@@ -96,7 +105,8 @@ MainObject::MainObject(QObject *parent)
conv->setTargetUrl(target_url);
printf("Deleting...\n");
conv_err=conv->
runDelete(username,password,rda->config()->logXloadDebugData());
runDelete(username,password,ssh_identity_filename,use_identity_file,
rda->config()->logXloadDebugData());
printf("Result: %s\n",(const char *)RDDelete::errorText(conv_err));
delete conv;

View File

@@ -26,7 +26,7 @@
#include <qobject.h>
#include <qurl.h>
#define DELETE_TEST_USAGE "[options]\n\nTest the Rivendell deletion routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--target-url=<url>\n\n"
#define DELETE_TEST_USAGE "[options]\n\nTest the Rivendell deletion routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--ssh-identity-key=<filename>\n\n--use-identity-file=y|n\n\n--target-url=<url>\n\n"
class MainObject : public QObject
{
@@ -37,6 +37,8 @@ class MainObject : public QObject
QString username;
QString password;
QUrl target_url;
QString ssh_identity_filename;
bool use_identity_file;
};

View File

@@ -37,6 +37,7 @@ MainObject::MainObject(QObject *parent)
username="";
password="";
RDDownload::ErrorCode conv_err;
use_identity_file=false;
//
// Open the Database
@@ -59,12 +60,20 @@ MainObject::MainObject(QObject *parent)
password=rda->cmdSwitch()->value(i);
rda->cmdSwitch()->setProcessed(i,true);
}
if(rda->cmdSwitch()->key(i)=="--ssh-identity-filename") {
ssh_identity_filename=rda->cmdSwitch()->value(i);
rda->cmdSwitch()->setProcessed(i,true);
}
if(rda->cmdSwitch()->key(i)=="--use-identity-file") {
use_identity_file=true;
rda->cmdSwitch()->setProcessed(i,true);
}
if(rda->cmdSwitch()->key(i)=="--source-url") {
source_url=rda->cmdSwitch()->value(i);
rda->cmdSwitch()->setProcessed(i,true);
}
if(rda->cmdSwitch()->key(i)=="--destination-filename") {
destination_filename=rda->cmdSwitch()->value(i);
if(rda->cmdSwitch()->key(i)=="--destination-file") {
destination_file=rda->cmdSwitch()->value(i);
rda->cmdSwitch()->setProcessed(i,true);
}
if(!rda->cmdSwitch()->processed(i)) {
@@ -81,7 +90,7 @@ MainObject::MainObject(QObject *parent)
fprintf(stderr,"download_test: missing source-url\n");
exit(256);
}
if(destination_filename.isEmpty()) {
if(destination_file.isEmpty()) {
fprintf(stderr,"download_test: missing destination-filename\n");
exit(256);
}
@@ -91,10 +100,11 @@ MainObject::MainObject(QObject *parent)
//
RDDownload *conv=new RDDownload(rda->config(),this);
conv->setSourceUrl(source_url);
conv->setDestinationFile(destination_filename);
conv->setDestinationFile(destination_file);
printf("Downloading...\n");
conv_err=conv->
runDownload(username,password,rda->config()->logXloadDebugData());
runDownload(username,password,ssh_identity_filename,use_identity_file,
rda->config()->logXloadDebugData());
printf("Result: %s\n",(const char *)RDDownload::errorText(conv_err));
delete conv;

View File

@@ -25,7 +25,7 @@
#include <qobject.h>
#define DOWNLOAD_TEST_USAGE "[options]\n\nTest the Rivendell download routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--source-url=<url>\n\n--destination-file=<filename>\n\n"
#define DOWNLOAD_TEST_USAGE "[options]\n\nTest the Rivendell download routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--ssh-identity-key=<filename>\n\n--use-identity-file=y|n\n\n--source-url=<url>\n\n--destination-file=<filename>\n\n"
class MainObject : public QObject
{
@@ -36,7 +36,9 @@ class MainObject : public QObject
QString username;
QString password;
QString source_url;
QString destination_filename;
QString destination_file;
QString ssh_identity_filename;
bool use_identity_file;
};

View File

@@ -37,6 +37,7 @@ MainObject::MainObject(QObject *parent)
username="";
password="";
RDUpload::ErrorCode conv_err;
use_identity_file=false;
//
// Open the Database
@@ -59,6 +60,14 @@ MainObject::MainObject(QObject *parent)
password=rda->cmdSwitch()->value(i);
rda->cmdSwitch()->setProcessed(i,true);
}
if(rda->cmdSwitch()->key(i)=="--ssh-identity-filename") {
ssh_identity_filename=rda->cmdSwitch()->value(i);
rda->cmdSwitch()->setProcessed(i,true);
}
if(rda->cmdSwitch()->key(i)=="--use-identity-file") {
use_identity_file=true;
rda->cmdSwitch()->setProcessed(i,true);
}
if(rda->cmdSwitch()->key(i)=="--source-file") {
source_filename=rda->cmdSwitch()->value(i);
rda->cmdSwitch()->setProcessed(i,true);
@@ -94,7 +103,8 @@ MainObject::MainObject(QObject *parent)
conv->setDestinationUrl(destination_url);
printf("Uploading...\n");
conv_err=conv->
runUpload(username,password,rda->config()->logXloadDebugData());
runUpload(username,password,ssh_identity_filename,use_identity_file,
rda->config()->logXloadDebugData());
printf("Result: %s\n",(const char *)RDUpload::errorText(conv_err));
delete conv;

View File

@@ -25,7 +25,7 @@
#include <qobject.h>
#define UPLOAD_TEST_USAGE "[options]\n\nTest the Rivendell upload routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--source-file=<filename>\n\n--destination-url=<url>\n\n"
#define UPLOAD_TEST_USAGE "[options]\n\nTest the Rivendell upload routines\n\nOptions are:\n--username=<username>\n\n--password=<password>\n\n--ssh-identity-key=<filename>\n\n--use-identity-file=y|n\n\n--source-file=<filename>\n\n--destination-url=<url>\n\n"
class MainObject : public QObject
{
@@ -37,6 +37,8 @@ class MainObject : public QObject
QString password;
QString source_filename;
QString destination_url;
QString ssh_identity_filename;
bool use_identity_file;
};