Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
b2bab9f0
Commit
b2bab9f0
authored
Dec 19, 2017
by
Steven Murray
Browse files
Deleted DataTransferConfig::createFromCastorConf()
parent
05458e4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
tapeserver/castor/tape/tapeserver/daemon/DataTransferConfig.cpp
View file @
b2bab9f0
...
...
@@ -44,65 +44,3 @@ castor::tape::tapeserver::daemon::DataTransferConfig::DataTransferConfig()
useRAO
(
false
),
externalEncryptionKeyScript
(
""
)
{}
//------------------------------------------------------------------------------
// createFromCastorConf
//------------------------------------------------------------------------------
castor
::
tape
::
tapeserver
::
daemon
::
DataTransferConfig
castor
::
tape
::
tapeserver
::
daemon
::
DataTransferConfig
::
createFromCastorConf
(
cta
::
log
::
Logger
*
const
log
)
{
common
::
CastorConfiguration
&
castorConf
=
common
::
CastorConfiguration
::
getConfig
();
DataTransferConfig
config
;
config
.
bufsz
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"BufSize"
,
castor
::
tape
::
tapeserver
::
daemon
::
TAPESERVER_BUFSZ
,
log
);
config
.
nbBufs
=
castorConf
.
getConfEntInt
<
uint32_t
>
(
"TapeServer"
,
"NbBufs"
,
log
);
config
.
bulkRequestMigrationMaxBytes
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"BulkRequestMigrationMaxBytes"
,
(
uint64_t
)
TAPEBRIDGE_BULKREQUESTMIGRATIONMAXBYTES
,
log
);
config
.
bulkRequestMigrationMaxFiles
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"BulkRequestMigrationMaxFiles"
,
(
uint64_t
)
TAPEBRIDGE_BULKREQUESTMIGRATIONMAXFILES
,
log
);
config
.
bulkRequestRecallMaxBytes
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"BulkRequestRecallMaxBytes"
,
(
uint64_t
)
TAPEBRIDGE_BULKREQUESTRECALLMAXBYTES
,
log
);
config
.
bulkRequestRecallMaxFiles
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"BulkRequestRecallMaxFiles"
,
(
uint64_t
)
TAPEBRIDGE_BULKREQUESTRECALLMAXFILES
,
log
);
config
.
maxBytesBeforeFlush
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"MaxBytesBeforeFlush"
,
(
uint64_t
)
TAPEBRIDGE_MAXBYTESBEFOREFLUSH
,
log
);
config
.
maxFilesBeforeFlush
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"MaxFilesBeforeFlush"
,
(
uint64_t
)
TAPEBRIDGE_MAXFILESBEFOREFLUSH
,
log
);
config
.
nbDiskThreads
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"NbDiskThreads"
,
castor
::
tape
::
tapeserver
::
daemon
::
TAPESERVER_NB_DISK_THREAD
,
log
);
config
.
xrootPrivateKey
=
castorConf
.
getConfEntString
(
"TapeServer"
,
"XrootPrivateKey"
,
"/etc/castor/xrd_tape_key.pem"
,
log
);
config
.
xrootTimeout
=
castorConf
.
getConfEntInt
(
"TapeServer"
,
"XrootTimeout"
,
0
,
log
);
const
std
::
string
useLBP
=
castorConf
.
getConfEntString
(
"TapeServer"
,
"UseLogicalBlockProtection"
,
"no"
,
log
);
const
std
::
string
useRAO
=
castorConf
.
getConfEntString
(
"TapeServer"
,
"UseRecommendedAccessOrder"
,
"no"
,
log
);
if
(
!
strcasecmp
(
useLBP
.
c_str
(),
"yes"
)
||
!
strcmp
(
useLBP
.
c_str
(),
"1"
))
{
config
.
useLbp
=
true
;
}
else
{
config
.
useLbp
=
false
;
}
if
(
!
strcasecmp
(
useRAO
.
c_str
(),
"yes"
)
||
!
strcmp
(
useRAO
.
c_str
(),
"1"
))
{
config
.
useRAO
=
true
;
}
else
{
config
.
useRAO
=
false
;
}
config
.
externalEncryptionKeyScript
=
castorConf
.
getConfEntString
(
"TapeServer"
,
"ExternalEncryptionKeyScript"
,
""
);
return
config
;
}
tapeserver/castor/tape/tapeserver/daemon/DataTransferConfig.hpp
View file @
b2bab9f0
...
...
@@ -129,16 +129,6 @@ struct DataTransferConfig {
*/
DataTransferConfig
()
throw
();
/**
* Returns a configuration structure based on the contents of
* /etc/castor/castor.conf and compile-time constants.
*
* @param log pointer to NULL or an optional logger object.
* @return The configuration structure.
*/
static
DataTransferConfig
createFromCastorConf
(
cta
::
log
::
Logger
*
const
log
=
NULL
);
};
// DataTransferConfig
}
// namespace daemon
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment