CVS Update: (clem) rocks/src/roll/base/src/command/commands/set/host/name

6 views
Skip to first unread message

c...@rocks-127.sdsc.edu

unread,
Feb 19, 2013, 1:48:43 PM2/19/13
to rocks-clusters-de...@googlegroups.com, anoop.r...@gmail.com, greg....@gmail.com, mason...@gmail.com, philip.pa...@gmail.com, luca.c...@gmail.com
clem 13/02/19 10:48:43

Modified: src/roll/base/src/command/commands/set/host/name __init__.py
Log:
when changing the name of a host check that the new name is not already used

Revision Changes Path
1.6 +8 -2 rocks/src/roll/base/src/command/commands/set/host/name/__init__.py

Index: __init__.py
===================================================================
RCS file: /home/cvs/CVSROOT/rocks/src/roll/base/src/command/commands/set/host/name/__init__.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -t -w -r1.5 -r1.6
--- __init__.py 27 Nov 2012 00:48:28 -0000 1.5
+++ __init__.py 19 Feb 2013 18:48:43 -0000 1.6
@@ -1,4 +1,4 @@
-# $Id: __init__.py,v 1.5 2012/11/27 00:48:28 phil Exp $
+# $Id: __init__.py,v 1.6 2013/02/19 18:48:43 clem Exp $
#
# @Copyright@
#
@@ -55,6 +55,9 @@
# @Copyright@
#
# $Log: __init__.py,v $
+# Revision 1.6 2013/02/19 18:48:43 clem
+# when changing the name of a host check that the new name is not already used
+#
# Revision 1.5 2012/11/27 00:48:28 phil
# Copyright Storm for Emerald Boa
#
@@ -107,6 +110,9 @@
if not name:
self.abort('must supply new name')

+ if name in self.getHostnames():
+ self.abort('the new host name "%s" already exists' % name)
+
hosts = self.getHostnames(args)
if len(hosts) > 1:
self.abort('must supply only one host')




Reply all
Reply to author
Forward
0 new messages