All of lore.kernel.org
 help / color / mirror / Atom feed
From: kupcevic@sourceware.org <kupcevic@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/ricci docs/storage_api.html modules/stor ...
Date: 16 Oct 2006 20:26:50 -0000	[thread overview]
Message-ID: <20061016202650.12120.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	kupcevic at sourceware.org	2006-10-16 20:26:48

Modified files:
	ricci/docs     : storage_api.html 
	ricci/modules/storage: StorageModule.cpp 

Log message:
	storage module: remove_mapper_source() - unimplemented function, here to satisfy API

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/docs/storage_api.html.diff?cvsroot=cluster&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/StorageModule.cpp.diff?cvsroot=cluster&r1=1.4&r2=1.5

--- conga/ricci/docs/storage_api.html	2006/07/12 16:52:56	1.4
+++ conga/ricci/docs/storage_api.html	2006/10/16 20:26:48	1.5
@@ -245,6 +245,32 @@
 		<P ALIGN=LEFT>On failure: <BR>- Any of errors specified above</P>
 	</UL>
 	<LI><P ALIGN=LEFT>remove_mapper_source</P>
+</UL>
+<UL>
+	<UL>
+		<P ALIGN=LEFT>Remove source from mapper. <BR>Source removal
+		procedure: <BR>1 ??? retrieve mapper<BR>2 ??? extract block 
+		device, which has alternative content, from &lt;sources/&gt; tag
+		 <BR>3 ??? submit block
+		device, from 2, and mapper attributes, using this function</P>
+		<P ALIGN=LEFT>Input variables: <BR>- ???bd??? (xml) ??? 
+		<A HREF="storage-bds.html">&lt;block_device/&gt;</A>, from
+		mapper's &lt;sources/&gt; tag, to be removed<BR>-
+		???mapper_type??? (string) ??? type of mapper from which source
+		is to be removed<BR>- ???mapper_id??? (string) ??? ID of mapper from
+		which source is to be removed<BR>- ???mapper_state_ind???
+		(string) ??? state indicator of mapper from which source is to
+		be removed</P>
+	</UL>
+</UL>
+<UL>
+	<UL>
+		<P ALIGN=LEFT>Output variables: <BR>- ???mapper??? (xml) ???
+		<A HREF="storage-mappers.html">&lt;mapper/&gt;</A> with source
+		removed 
+		</P>
+		<P ALIGN=LEFT>On failure: <BR>- Any of errors specified above</P>
+	</UL>
 	<LI><P ALIGN=LEFT>remove_mapper</P>
 </UL>
 <UL>
@@ -351,4 +377,4 @@
 <P ALIGN=LEFT><BR><BR>
 </P>
 </BODY>
-</HTML>
\ No newline at end of file
+</HTML>
--- conga/ricci/modules/storage/StorageModule.cpp	2006/08/10 22:53:09	1.4
+++ conga/ricci/modules/storage/StorageModule.cpp	2006/10/16 20:26:48	1.5
@@ -40,6 +40,7 @@
 static VarMap create_mapper(const VarMap& args);
 static VarMap remove_mapper(const VarMap& args);
 static VarMap add_sources(const VarMap& args);
+static VarMap remove_source(const VarMap& args);
 static VarMap modify_mapper(const VarMap& args);
 static VarMap create_bd(const VarMap& args);
 static VarMap get_bd(const VarMap& args);
@@ -69,9 +70,10 @@
   
   api_1_0["get_mapper_templates"]               = get_mapper_templates;
   api_1_0["create_mapper"]                      = create_mapper;
+  api_1_0["modify_mapper"]                      = modify_mapper;
   api_1_0["remove_mapper"]                      = remove_mapper;
   api_1_0["add_mapper_sources"]                 = add_sources;
-  api_1_0["modify_mapper"]                      = modify_mapper;
+  api_1_0["remove_mapper_source"]               = remove_source;
   
   api_1_0["create_bd"]                          = create_bd;
   api_1_0["get_bd"]                             = get_bd;
@@ -267,6 +269,51 @@
   return ret;
 }
 
+VarMap 
+remove_source(const VarMap& args)
+{
+  String mapper_type, mapper_id, mapper_state_ind;
+  XMLObject bd;
+  try {
+    VarMap::const_iterator iter = args.find("mapper_type");
+    if (iter == args.end())
+      throw APIerror("missing mapper_type variable");
+    mapper_type = iter->second.get_string();
+    
+    iter = args.find("mapper_id");
+    if (iter == args.end())
+      throw APIerror("missing mapper_id variable");
+    mapper_id = iter->second.get_string();
+    
+    iter = args.find("mapper_state_ind");
+    if (iter == args.end())
+      throw APIerror("missing mapper_state_ind variable");
+    mapper_state_ind = iter->second.get_string();
+    
+    iter = args.find("bd");
+    if (iter == args.end())
+      throw APIerror("missing bd variable");
+    bd = iter->second.get_XML();
+  } catch ( String e ) {
+    throw APIerror(e);
+  }
+  
+  throw String("remove_mapper_source() function not implemented");
+  
+  /*
+  BDParsed parsed_bd(bd);
+  counting_auto_ptr<Mapper> mapper = MapperFactory::remove_source(mapper_type,
+								  mapper_id,
+								  mapper_state_ind,
+								  parsed_bd);
+  
+  Variable var("mapper", mapper->xml());
+  VarMap ret;
+  ret.insert(pair<String, Variable>(var.name(), var));
+  return ret;
+  */
+}
+
 
 VarMap 
 create_bd(const VarMap& args)



             reply	other threads:[~2006-10-16 20:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-16 20:26 kupcevic [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-07-12 16:52 [Cluster-devel] conga/ricci docs/storage_api.html modules/stor kupcevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061016202650.12120.qmail@sourceware.org \
    --to=kupcevic@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.