33 #include "BESXMLSetContainerCommand.h" 34 #include "BESContainerStorageList.h" 35 #include "BESXMLUtils.h" 37 #include "BESResponseNames.h" 38 #include "BESDataNames.h" 39 #include "BESSyntaxUserError.h" 60 map<string, string> props;
62 if (action != SETCONTAINER_STR) {
63 string err =
"The specified command " + action +
" is not a set container command";
69 map<string, string> cprops;
72 if (value.empty() && !real) {
73 string err = action +
" command: container real name missing";
80 string err = action +
" command: name property missing";
83 d_xmlcmd_dhi.
data[SYMBOLIC_NAME] = name;
86 d_xmlcmd_dhi.
data[STORE_NAME] = PERSISTENCE_VOLATILE;
87 storage = props[
"space"];
88 if (!storage.empty()) {
89 d_xmlcmd_dhi.
data[STORE_NAME] = storage;
92 storage = PERSISTENCE_VOLATILE;
96 string container_type = props[
"type"];
97 d_xmlcmd_dhi.
data[CONTAINER_TYPE] = container_type;
100 d_xmlcmd_dhi.
data[REAL_NAME] = value;
105 xmlBufferPtr buf = xmlBufferCreate();
106 xmlNodeDump(buf, real->doc, real, 2, 1);
108 value = (
char *) buf->content;
109 d_xmlcmd_dhi.
data[REAL_NAME] = (
char *) (buf->content);
113 d_xmlcmd_dhi.
action = SETCONTAINER;
115 d_cmd_log_info = (string)
"set container in " + storage +
" values " + name +
"," + value;
116 if (!container_type.empty()) {
134 strm << BESIndent::LMarg <<
"BESXMLSetContainerCommand::dump - (" << (
void *)
this <<
")" << endl;
137 BESIndent::UnIndent();
static xmlNode * GetFirstChild(xmlNode *node, string &child_name, string &child_value, map< string, string > &child_props)
get the first element child node for the given node
virtual void dump(ostream &strm) const
dumps information about this object
static void GetNodeInfo(xmlNode *node, string &name, string &value, map< string, string > &props)
get the name, value if any, and any properties for the specified node
error thrown if there is a user syntax error in the request or any other user error ...
virtual void set_response()
The request has been parsed, use the command action name to set the response handler.
virtual void parse_request(xmlNode *node)
parse a set container command.
virtual void dump(ostream &strm) const
dumps information about this object
Structure storing information used by the BES to handle the request.
map< string, string > data
the map of string data that will be required for the current request.
string action
the response object requested, e.g. das, dds
std::string d_cmd_log_info
Used only for the log.