Please enable JavaScript.
Coggle requires JavaScript to display documents.
.app.settings, Test cases (When file .app.settings doesnt exist (Pass if…
.app.settings
Test cases
When file .app.settings doesnt exist
Pass if boost::property is commented
Fails with cannot open file .app.settings
When .app.settings exists with data
Pass if boost::property is commented
Pass even if boos_property is present
when .app.settings is 0 bytes or truncated
Fails if boost::property exists
Pass if boost::property is commented
settings.setCredentials(cred)
bin/ddbmcon < /tmp/gowtham/json/config_new.txt
-- Passing the json file config_new.txt which is a json file containing the configuration details to run the backup. This will create the .app.settings file which will be used for fetching information during backup/restore.
The main.cpp is caled first always.
Agent.run()
creates an obj for the agent.
public:
run()
private:
setuplogging()
dogetopt()
usage()
getstdin()
buildJSONResponse()
agent.cpp
calls dogetopt(), setlogging, getstdin(), theCmd->runCommand(input, contents, errors)
runCommand()
JSONExtract extractor()
if the command is CONFIGURE_STR extracted via the json extractor:
contents.
If configure:
contents.push_back(doConfigure(input, errors));
agentCmd::doConfigure(const libcpp::JSONNode &input,
std::list<libappcommon::errorMsg> &errors)
extracts appagenttype. check if its RMAN
saveSettings()
return ()
saveSettings(argjson, appAgentTypeName)
extract the values from the json file using the extractor
:unlock:
add the values to the cred object to write into appsettings file
check if api version is 2.2 and ddconfigtype is primary:
get the applicationinstances(an array of dictionary).
Check if that value is NULL --> suitable error msg
get json entry fron the config_new.txt for APPLICATION_INSTANCES_STR key.
If returns null:
False[not null]
for each entry in applicationinstance, get the appinstance value.
the applicationinstances has 2 keys --
ApplicationInstance
Sources
srcjn = get the sources_str from json file.
if srcjn is null:
provide suitable error msg.
for each entry in sources, extract the values correspondingly store them in the variables.
if appagent type is rman then the source = name <dbid>
---for oracle the source is the dbid --- sources.insert(source)
Add the sources entries into the cred object.
settings.setCredential(cred)
1 more item...
If true
If False instsjn isnot NULL
True
:
else