Skip to content

Commit de35878

Browse files
authored
Merge pull request #13 from DMTF/1.0.0-Tagging
1.0.0 Versioning
2 parents cd80140 + adbe969 commit de35878

File tree

4 files changed

+20
-18
lines changed

4 files changed

+20
-18
lines changed

AUTHORS.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
21
# Original Contribution:
3-
* Majec Systems
4-
5-
6-
# Other Key Contributions:
7-
82

3+
* Majec Systems

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
21
# Change Log
32

3+
## [1.0.0] - 2018-03-02
4+
- Added tag validation
5+
- Removed restriction on BeautifulSoup version
6+
- Added timeout option
7+
- Added support to alias a file from a local directory
8+
49
## [0.9.0] - 2017-04-06
510
- Initial Public Release

README.md

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
Copyright 2016 Distributed Management Task Force, Inc. All rights reserved.
2-
# Redfish Reference Checker - Version 0.9
1+
Copyright 2016-2018 Distributed Management Task Force, Inc. All rights reserved.
2+
3+
# Redfish Reference Checker
34

45
## About
6+
57
RedfishReferenceTool.py is a python3 tool that checks for valid reference URLs in CSDL xml files.
68

79
## Pre-requisites
10+
811
The following requirements may be installed via the command line:
912

1013
pip3 install -r requirements.txt
@@ -16,25 +19,21 @@ The requirements for this tool are as follows:
1619
* lxml - https://pypi.python.org/pypi/lxml
1720

1821
## Installation
22+
1923
Copy RedfishReferenceTool.py into any tool directory, and requires no extra configuration.
2024

2125
Run: python3 RedfishReferenceTool.py [url] [--nochkcert] [--alias file] [--file] [--timeout]
2226

2327
URL includes authority. Note that quotations or an escape must be used for '$' and '#' characters, when using ODATA Uris.
2428

2529
## Execution
26-
Upon execution, attempts to get an XML file at the URL given, and exits with 1
27-
on bad URLs or non xml formatted files, then dereferences all reference URLs
28-
in the file.
30+
31+
Upon execution, attempts to get an XML file at the URL given, and exits with 1 on bad URLs or non xml formatted files, then dereferences all reference URLs in the file.
2932

3033
Upon specifying --nochkcert, it will not attempt to verify any certification provided. --timeout may be used to increase request timeouts.
3134

32-
Upon specifying --alias, it will read a json-formatted file that provides an alias for URIs or URLs not currently published online,
33-
and instead points to a local file.
34-
For single files, a single URL may be mapped on the left hand side to point to a file stored on the right.
35-
If a URL is appended with /\*, then it may point to a directory appended with /\* on the right, such that each file in the directory will be mapped to its own URL.
35+
Upon specifying --alias, it will read a json-formatted file that provides an alias for URIs or URLs not currently published online, and instead points to a local file. For single files, a single URL may be mapped on the left hand side to point to a file stored on the right. If a URL is appended with /\*, then it may point to a directory appended with /\* on the right, such that each file in the directory will be mapped to its own URL.
3636

3737
For a simpler way to test one local file, please use the parameter --file, which will interpret the URL given as a locally stored file relative to the current work directory. This mode will not interpret a "host", and thus will fail if the stored file contains relative references.
3838

3939
Exits with success if the amount of missing references is zero.
40-

RedfishReferenceTool.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
1717

18+
tool_version = '1.0.0'
1819

1920
def generateXmlReferences(reftags):
2021
# unused block to write a valid xml file instead of just printing to file
@@ -109,7 +110,7 @@ def getAlias(uri, aliasDict):
109110

110111

111112
if __name__ == "__main__":
112-
argget = argparse.ArgumentParser(description='Tool that checks if reference contain all valid URLs')
113+
argget = argparse.ArgumentParser(description='Redfish Reference Checker {}: A tool that checks if reference contain all valid URLs'.format(tool_version))
113114
argget.add_argument('url', type=str, help='destination url to test')
114115
argget.add_argument('--file', action='store_true', help='use url as filepath to local file')
115116
argget.add_argument('--nochkcert', action='store_true', help='ignore check for certificate')
@@ -119,6 +120,8 @@ def getAlias(uri, aliasDict):
119120

120121
args = argget.parse_args()
121122

123+
print('Redfish Reference Checker {}'.format(tool_version))
124+
122125
rootURL = args.url
123126
chkCert = not args.nochkcert
124127
aliasFile = args.alias

0 commit comments

Comments
 (0)