logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

r9954 - trunk/libraries/koala/sources/examples/buddha: msg#00013

Subject: r9954 - trunk/libraries/koala/sources/examples/buddha
Author: hannes
Date: Sat Sep  3 16:34:46 2005
New Revision: 9954

Modified:
   trunk/libraries/koala/sources/examples/buddha/TODO
   trunk/libraries/koala/sources/examples/buddha/buddha.dylan
   trunk/libraries/koala/sources/examples/buddha/host.dylan
Log:
Bug: 7257
<host> should always have an ip, and doesn't always have a hostname.
ip init-keyword can be a string, which will generate an <ip-address>
by make(<host>);


Modified: trunk/libraries/koala/sources/examples/buddha/TODO
==============================================================================
--- trunk/libraries/koala/sources/examples/buddha/TODO  (original)
+++ trunk/libraries/koala/sources/examples/buddha/TODO  Sat Sep  3 16:34:46 2005
@@ -4,3 +4,12 @@
 
 blackhole ip-ranges
  => requested by abuse phone
+
+dynamic forms
+ => dhcp options can be multiple lines
+
+user management
+
+prevent cross-site scripting (escape <> in all input data)
+
+interface to get the next /XX subnet (or the next subnet with at least Y ips)

Modified: trunk/libraries/koala/sources/examples/buddha/buddha.dylan
==============================================================================
--- trunk/libraries/koala/sources/examples/buddha/buddha.dylan  (original)
+++ trunk/libraries/koala/sources/examples/buddha/buddha.dylan  Sat Sep  3 
16:34:46 2005
@@ -471,8 +471,7 @@
 
 define function main2()
   let cisco = make(<cisco-ios-device>,
-                   name: "router",
-                   ip: make(<ip-address>, ip: "23.23.23.23"),
+                   ip: "23.23.23.23",
                    login-password: "xxx",
                    enable-password: "xxx");
 

Modified: trunk/libraries/koala/sources/examples/buddha/host.dylan
==============================================================================
--- trunk/libraries/koala/sources/examples/buddha/host.dylan    (original)
+++ trunk/libraries/koala/sources/examples/buddha/host.dylan    Sat Sep  3 
16:34:46 2005
@@ -2,25 +2,25 @@
 author: Hannes Mehnert <hannes@xxxxxxxxxxx>
 
 define class <host> (<object>)
-  slot host-name :: <string>, required-init-keyword: name:;
-  slot host-ipv4-address :: <ip-address>, init-keyword: ip:;
+  slot host-name :: <string>, init-keyword: name:;
+  slot host-ipv4-address :: <ip-address>, required-init-keyword: ip:;
   slot host-net :: <subnet>, init-keyword: net:;
   slot host-mac :: <mac-address>, init-keyword: mac:;
   slot host-zone :: <zone>, init-keyword: zone:;
 end;
 
-
-/*
 define method make (host == <host>,
                     #next next-method,
                     #rest rest,
                     #key ip,
-                    mac,
                     #all-keys) => (res :: <host>)
   let args = rest;
-  apply(next-method, host, ip: ip, mac: mac, args);
+  if (instance?(ip, <string>))
+    args := exclude(args, #"ip");
+    ip := make(<ip-address>, ip: ip);
+  end;
+  apply(next-method, host, ip: ip, args);
 end method;
-*/
 
 define method print-object (host :: <host>, stream :: <stream>)
  => ()
-- 
Gd-chatter mailing list
Gd-chatter@xxxxxxxxxxxxxxxx
https://gauss.gwydiondylan.org/mailman/listinfo/gd-chatter



<Prev in Thread] Current Thread [Next in Thread>