Skip to content

Commit 260818d

Browse files
committed
checkNodename.py added
1 parent d5cdaaf commit 260818d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

lib/checkNodename.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/python
2+
3+
4+
import yaml
5+
import os
6+
7+
output = dict()
8+
def CheckNodename(yaml_config):
9+
with open(yaml_config, "r") as f:
10+
myval = yaml.safe_load(f)
11+
output['message'] = myval[0]['Description']
12+
if os.uname:
13+
output['status'] = True
14+
else:
15+
output['status'] = False
16+
17+
18+
return output
19+

0 commit comments

Comments
 (0)