Changeset 194
- Timestamp:
- 10/29/10 10:31:49 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/pxeconfig.py
r186 r194 28 28 # 29 29 """ 30 Usage: pxeconfig [-f,--filename <name>] <hosts >31 32 Specifying host names:30 Usage: pxeconfig [-f,--filename <name>] <hosts|mac_addresses> 31 32 Specifying hosts or mac addresses: 33 33 To specify a range use the [] to indicate a range, 34 34 a couple of examples: 35 35 36 36 The first five nodes of rack 16 37 37 - gb-r16n[1-5] 38 38 39 39 The first five nodes and node 12 and 18 of rack 16 to 20 … … 41 41 42 42 The first five nodes de in rack 16 with padding enabled 43 - gb-r[16]n[01-5] 44 43 - gb-r[16]n[01-5] 44 45 Host with mac address 00:19:b9:de:21:47 and first five node of rack 15 46 - 00:19:b9:de:21:47 gb-r15n[1-5] 47 45 48 The ranges ([]) are not only limited to numbers, letters can also be used. 46 49 … … 310 313 ## 311 314 # Are the hosts wiht only mac addresses defined in the configuration file 315 # or specified on the command line 316 # 317 mac_addr_re = re.compile('([a-fA-F0-9]{2}[:|\-]?){6}') 312 318 313 319 for host in args: … … 315 321 mac_addr = config.get(host, 'mac_address') 316 322 mac_2_hex(mac_addr, options) 323 324 elif mac_addr_re.search(host): 325 mac_2_hex(host, options) 317 326 else: 318 327 host_2_hex(host, options)
Note: See TracChangeset
for help on using the changeset viewer.