~ubuntu-branches/ubuntu/wily/marionnet/wily

« back to all changes in this revision

Viewing changes to cloud.ml

  • Committer: Package Import Robot
  • Author(s): Lucas Nussbaum
  • Date: 2014-04-02 16:59:06 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20140402165906-w6nrmczff6l0cyc3
Tags: 0.90.6+bzr448-1
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
79
79
 
80
80
  module Properties = struct
81
81
    include Data
82
 
    let dynlist () = st#network#get_nodes_that_can_startup ~devkind:`Cloud ()
 
82
    let dynlist () = st#network#get_node_names_that_can_startup ~devkind:`Cloud ()
83
83
 
84
84
    let dialog name () =
85
85
     let d = (st#network#get_node_by_name name) in
128
128
  module Stop = struct
129
129
    type t = string (* just the name *)
130
130
    let to_string = (Printf.sprintf "name = %s\n")
131
 
    let dynlist () = st#network#get_nodes_that_can_gracefully_shutdown ~devkind:`Cloud ()
 
131
    let dynlist () = st#network#get_node_names_that_can_gracefully_shutdown ~devkind:`Cloud ()
132
132
    let dialog = Menu_factory.no_dialog_but_simply_return_name
133
133
    let reaction name = (st#network#get_node_by_name name)#gracefully_shutdown
134
134
 
137
137
  module Suspend = struct
138
138
    type t = string (* just the name *)
139
139
    let to_string = (Printf.sprintf "name = %s\n")
140
 
    let dynlist () = st#network#get_nodes_that_can_suspend ~devkind:`Cloud ()
 
140
    let dynlist () = st#network#get_node_names_that_can_suspend ~devkind:`Cloud ()
141
141
    let dialog = Menu_factory.no_dialog_but_simply_return_name
142
142
    let reaction name = (st#network#get_node_by_name name)#suspend
143
143
 
146
146
  module Resume = struct
147
147
    type t = string (* just the name *)
148
148
    let to_string = (Printf.sprintf "name = %s\n")
149
 
    let dynlist () = st#network#get_nodes_that_can_resume ~devkind:`Cloud ()
 
149
    let dynlist () = st#network#get_node_names_that_can_resume ~devkind:`Cloud ()
150
150
    let dialog = Menu_factory.no_dialog_but_simply_return_name
151
151
    let reaction name = (st#network#get_node_by_name name)#resume
152
152
 
226
226
   (match root with
227
227
    | ("cloud", attrs) ->
228
228
        let name  = List.assoc "name"  attrs in
229
 
        Log.printf "Importing cloud \"%s\"...\n" name;
 
229
        Log.printf1 "Importing cloud \"%s\"...\n" name;
230
230
        let x = new User_level_cloud.cloud ~network ~name () in
231
231
        x#from_tree ("cloud", attrs) children  ;
232
 
        Log.printf "Cloud \"%s\" successfully imported.\n" name;
 
232
        Log.printf1 "Cloud \"%s\" successfully imported.\n" name;
233
233
        true
234
234
   | _ ->
235
235
        false