Add GPl License header to rackhd inventory file. (#24354)

This commit is contained in:
Alejandro Bednarik 2017-07-10 04:09:29 -03:00 committed by John R Barker
parent d5ae6cc585
commit 2420bca0b5

View file

@ -1,10 +1,24 @@
#!/usr/bin/env python #!/usr/bin/env python
import argparse # This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
import json import json
import os import os
import requests import requests
import types import argparse
RACKHD_URL = 'http://localhost:8080' RACKHD_URL = 'http://localhost:8080'
@ -51,6 +65,7 @@ def parse_args():
parser.add_argument('--list', action='store_true') parser.add_argument('--list', action='store_true')
return parser.parse_args() return parser.parse_args()
try: try:
# check if rackhd url(ie:10.1.1.45:8080) is specified in the environment # check if rackhd url(ie:10.1.1.45:8080) is specified in the environment
RACKHD_URL = 'http://' + str(os.environ['RACKHD_URL']) RACKHD_URL = 'http://' + str(os.environ['RACKHD_URL'])