@@ -185,10 +185,6 @@ cdef class Nodes(dict):
185185 def allocated_cpus (self ):
186186 return _sum_prop(self , Node.allocated_cpus)
187187
188- @property
189- def effective_cpus (self ):
190- return _sum_prop(self , Node.effective_cpus)
191-
192188 @property
193189 def current_watts (self ):
194190 return _sum_prop(self , Node.current_watts)
@@ -308,38 +304,6 @@ cdef class Node:
308304
309305 return wrap
310306
311- def create (self , state = " future" ):
312- """ Create a node.
313-
314- Implements the slurm_create_node RPC.
315-
316- Args:
317- state (str, optional):
318- An optional state the created Node should have. Allowed values
319- are "future" and "cloud". "future" is the default.
320-
321- Returns:
322- (pyslurm.Node): This function returns the current Node-instance
323- object itself.
324-
325- Raises:
326- RPCError: If creating the Node was not successful.
327- MemoryError: If malloc failed to allocate memory.
328-
329- Examples:
330- >>> import pyslurm
331- >>> node = pyslurm.Node("testnode").create()
332- """
333- if not self .name:
334- raise ValueError (" You need to set a node name first." )
335-
336- self ._alloc_umsg()
337- cstr.fmalloc(& self .umsg.extra,
338- f" NodeName={self.name} State={state}" )
339- verify_rpc(slurm_create_node(self .umsg))
340-
341- return self
342-
343307 def modify (self , changes ):
344308 """ Modify a node.
345309
@@ -366,22 +330,6 @@ cdef class Node:
366330 cstr.fmalloc(& n.umsg.node_names, self .name)
367331 verify_rpc(slurm_update_node(n.umsg))
368332
369- def delete (self ):
370- """ Delete a node.
371-
372- Implements the slurm_delete_node RPC.
373-
374- Raises:
375- RPCError: If deleting the Node was not successful.
376- MemoryError: If malloc failed to allocate memory.
377-
378- Examples:
379- >>> import pyslurm
380- >>> pyslurm.Node("localhost").delete()
381- """
382- self ._alloc_umsg()
383- verify_rpc(slurm_delete_node(self .umsg))
384-
385333 def as_dict (self ):
386334 """ Node information formatted as a dictionary.
387335
@@ -515,10 +463,6 @@ cdef class Node:
515463 def weight (self , val ):
516464 self .info.weight= self .umsg.weight = u32(val)
517465
518- @property
519- def effective_cpus (self ):
520- return u16_parse(self .info.cpus_efctv)
521-
522466 @property
523467 def total_cpus (self ):
524468 return u16_parse(self .info.cpus, on_noval = 0 )
@@ -610,11 +554,11 @@ cdef class Node:
610554
611555 @property
612556 def idle_cpus (self ):
613- efctv = self .effective_cpus
614- if not efctv :
557+ tot = self .total_cpus
558+ if not tot :
615559 return None
616560
617- return efctv - self .allocated_cpus
561+ return tot - self .allocated_cpus
618562
619563 @property
620564 def cpu_binding (self ):
0 commit comments