mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-11 15:16:07 +01:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user