[Xen-devel] [PATCH] remove all reference to network-limit, it calls phantom code

Sean Dague
Tue, 15 Nov 2005 22:34:21 -0000

The following patch removes every (hopefully) reference to network-limit.
Upon further investigation it sets Device parameters that don''t exist
any
longer, thus causing exceptions.  As it looks like this is completely
obsolete, and no one is actively working on it, we should just rip it out to
end the confusion.

Signed-off-by: Sean Dague <sean@dague.net>

Diffstat output:
 docs/man/xm.pod.1                   |    4 ----
 tools/python/xen/xend/XendClient.py |    7 -------
 tools/python/xen/xend/XendDomain.py |   11 -----------
 tools/python/xen/xm/main.py         |   11 -----------
 4 files changed, 33 deletions(-)

diff -r 9c7aeec94f8a docs/man/xm.pod.1
--- a/docs/man/xm.pod.1	Tue Nov 15 19:46:48 2005 +0100
+++ b/docs/man/xm.pod.1	Tue Nov 15 17:12:24 2005 -0500
@@ -645,10 +645,6 @@

 =item B<network-detach> I<domain-id> I<devid>

-=item B<network-limit> I<domain-id> I<vif> I<credit>
I<period>
-
-Limit the transmission rate of a virtual network interface.
-
 =item B<network-list> I<domain-id>

 List virtual network interfaces for a domain.  The returned output is
diff -r 9c7aeec94f8a tools/python/xen/xend/XendClient.py
--- a/tools/python/xen/xend/XendClient.py	Tue Nov 15 19:46:48 2005 +0100
+++ b/tools/python/xen/xend/XendClient.py	Tue Nov 15 17:12:24 2005 -0500
@@ -301,13 +301,6 @@
         return self.xendPost(self.domainurl(dom),
                             {''op''    :
''set_vcpus'',
                              ''vcpus'' : vcpus })
-
-    def xend_domain_vif_limit(self, id, vif, credit, period):
-        return self.xendPost(self.domainurl(id),
-                            { ''op''      :
''vif_limit_set'',
-                              ''vif''     : vif,
-                              ''credit''  : credit,
-                              ''period''  : period })

     def xend_domain_devices(self, id, type):
         return self.xendPost(self.domainurl(id),
diff -r 9c7aeec94f8a tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py	Tue Nov 15 19:46:48 2005 +0100
+++ b/tools/python/xen/xend/XendDomain.py	Tue Nov 15 17:12:24 2005 -0500
@@ -466,17 +466,6 @@
         except Exception, ex:
             raise XendError(str(ex))

-
-    def domain_vif_limit_set(self, domid, vif, credit, period):
-        """Limit the vif''s transmission rate
-        """
-        dominfo = self.domain_lookup(domid)
-        dev = dominfo.getDevice(''vif'', vif)
-        if not dev:
-            raise XendError("invalid vif")
-        return dev.setCreditLimit(credit, period)
-
-
     def domain_maxmem_set(self, domid, mem):
         """Set the memory limit for a domain.

diff -r 9c7aeec94f8a tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py	Tue Nov 15 19:46:48 2005 +0100
+++ b/tools/python/xen/xm/main.py	Tue Nov 15 17:12:24 2005 -0500
@@ -118,8 +118,6 @@
         Create a new virtual network device
     network-detach  <DomId> <DevId>  Destroy a domain''s
virtual network
                                      device, where <DevId> is the device
ID.
-    network-limit   <DomId> <Vif> <Credit> <Period>
-        Limit the transmission rate of a virtual network interface
     network-list    <DomId>        List virtual network interfaces for a
domain

   Vnet commands:
@@ -556,13 +554,6 @@
 def xm_log(args):
     from xen.xend.XendClient import server
     print server.xend_node_log()
-
-def xm_network_limit(args):
-    arg_check(args,4,"network-limit")
-    dom = args[0]
-    v = map(int, args[1:4])
-    from xen.xend.XendClient import server
-    server.xend_domain_vif_limit(dom, *v)

 def xm_network_list(args):
     arg_check(args,1,"network-list")
@@ -716,7 +707,6 @@
     # network
     "network-attach": xm_network_attach,
     "network-detach": xm_network_detach,
-    "network-limit": xm_network_limit,
     "network-list": xm_network_list,
     # vnet
     "vnet-list": xm_vnet_list,
@@ -739,7 +729,6 @@
 aliases = {
     "balloon": "mem-set",
     "vif-list": "network-list",
-    "vif-limit": "network-limit",
     "vbd-create": "block-create",
     "vbd-destroy": "block-destroy",
     "vbd-list": "block-list",

--
__________________________________________________________________

Sean Dague                                       Mid-Hudson Valley
sean at dague dot net                            Linux Users Group
http://dague.net                                 http://mhvlug.org

There is no silver bullet.  Plus, werewolves make better neighbors
than zombies, and they tend to keep the vampire population down.
__________________________________________________________________


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com