Skip to content

Commit f1faa43

Browse files
committed
Switched default branch to main; updated comments for REST methods
Signed-off-by: Mike Raineri <[email protected]>
1 parent bed8de2 commit f1faa43

28 files changed

+82
-82
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
git config user.email "<>"
7878
git add CHANGELOG.md setup.py src/redfish/__init__.py
7979
git commit -s -m "${{github.event.inputs.version}} versioning"
80-
git push origin master
80+
git push origin main
8181
- name: Make the release
8282
env:
8383
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

README.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ python-redfish-library
66
.. image:: https://img.shields.io/github/release/DMTF/python-redfish-library.svg?maxAge=2592000
77
:target: https://github.com/DMTF/python-redfish-library/releases
88
.. image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg
9-
:target: https://raw.githubusercontent.com/DMTF/python-redfish-library/master/LICENSE
9+
:target: https://raw.githubusercontent.com/DMTF/python-redfish-library/main/LICENSE
1010
.. image:: https://img.shields.io/pypi/pyversions/redfish.svg?maxAge=2592000
1111
:target: https://pypi.python.org/pypi/redfish
1212

@@ -206,4 +206,4 @@ Copyright and License
206206

207207
Copyright Notice:
208208
Copyright 2016-2022 DMTF. All rights reserved.
209-
License: BSD 3-Clause License. For full text see link: `https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md <https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md>`_
209+
License: BSD 3-Clause License. For full text see link: `https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md <https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md>`_

examples/context_manager.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
import sys
77
import redfish

examples/discover.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
import redfish
77

examples/multipart_push.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
import sys
77
import json

examples/quickstart.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
import sys
77
import redfish

examples/quickstart_rmc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
import os
77
import sys

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
from setuptools import setup, find_packages
77
from codecs import open

src/redfish/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
""" Redfish restful library """
77

src/redfish/discovery/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md

src/redfish/discovery/discovery.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- coding: utf-8 -*-
77
"""Discovers Redfish services"""

src/redfish/rest/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
""" Utilities to simplify interaction with Redfish data """

src/redfish/rest/v1.py

+54-54
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- coding: utf-8 -*-
77
"""Helper module for working with REST technology."""
@@ -610,12 +610,12 @@ def get_root_object(self):
610610
def get(self, path, args=None, headers=None):
611611
"""Perform a GET request
612612
613-
:param path: the URL path.
614-
:type path: str.
615-
:param args: the arguments to get.
616-
:type args: dict.
617-
:param headers: dict of headers to be appended.
618-
:type headers: dict.
613+
:param path: The URI to access
614+
:type path: str
615+
:param args: The query parameters to provide with the request
616+
:type args: dict, optional
617+
:param headers: Additional HTTP headers to provide in the request
618+
:type headers: dict, optional
619619
:returns: returns a rest request with method 'Get'
620620
621621
"""
@@ -630,12 +630,12 @@ def get(self, path, args=None, headers=None):
630630
def head(self, path, args=None, headers=None):
631631
"""Perform a HEAD request
632632
633-
:param path: the URL path.
634-
:type path: str.
635-
:param args: the arguments to get.
636-
:type args: dict.
637-
:param headers: dict of headers to be appended.
638-
:type headers: dict.
633+
:param path: The URI to access
634+
:type path: str
635+
:param args: The query parameters to provide with the request
636+
:type args: dict, optional
637+
:param headers: Additional HTTP headers to provide in the request
638+
:type headers: dict, optional
639639
:returns: returns a rest request with method 'Head'
640640
641641
"""
@@ -645,14 +645,14 @@ def head(self, path, args=None, headers=None):
645645
def post(self, path, args=None, body=None, headers=None):
646646
"""Perform a POST request
647647
648-
:param path: the URL path.
649-
:type path: str.
650-
:param args: the arguments to post.
651-
:type args: dict.
652-
:param body: the body to the sent.
653-
:type body: str.
654-
:param headers: dict of headers to be appended.
655-
:type headers: dict.
648+
:param path: The URI to access
649+
:type path: str
650+
:param args: The query parameters to provide with the request
651+
:type args: dict, optional
652+
:param body: The request body to provide; use a dict for a JSON body, list for multipart forms, bytes for an octet stream, or str for an unstructured request
653+
:type body: dict or list or bytes or str, optional
654+
:param headers: Additional HTTP headers to provide in the request
655+
:type headers: dict, optional
656656
:returns: returns a rest request with method 'Post'
657657
658658
"""
@@ -662,14 +662,14 @@ def post(self, path, args=None, body=None, headers=None):
662662
def put(self, path, args=None, body=None, headers=None):
663663
"""Perform a PUT request
664664
665-
:param path: the URL path.
666-
:type path: str.
667-
:param args: the arguments to put.
668-
:type args: dict.
669-
:param body: the body to the sent.
670-
:type body: str.
671-
:param headers: dict of headers to be appended.
672-
:type headers: dict.
665+
:param path: The URI to access
666+
:type path: str
667+
:param args: The query parameters to provide with the request
668+
:type args: dict, optional
669+
:param body: The request body to provide; use a dict for a JSON body, list for multipart forms, bytes for an octet stream, or str for an unstructured request
670+
:type body: dict or list or bytes or str, optional
671+
:param headers: Additional HTTP headers to provide in the request
672+
:type headers: dict, optional
673673
:returns: returns a rest request with method 'Put'
674674
675675
"""
@@ -679,14 +679,14 @@ def put(self, path, args=None, body=None, headers=None):
679679
def patch(self, path, args=None, body=None, headers=None):
680680
"""Perform a PUT request
681681
682-
:param path: the URL path.
683-
:type path: str.
684-
:param args: the arguments to patch.
685-
:type args: dict.
686-
:param body: the body to the sent.
687-
:type body: str.
688-
:param headers: dict of headers to be appended.
689-
:type headers: dict.
682+
:param path: The URI to access
683+
:type path: str
684+
:param args: The query parameters to provide with the request
685+
:type args: dict, optional
686+
:param body: The request body to provide; use a dict for a JSON body, list for multipart forms, bytes for an octet stream, or str for an unstructured request
687+
:type body: dict or list or bytes or str, optional
688+
:param headers: Additional HTTP headers to provide in the request
689+
:type headers: dict, optional
690690
:returns: returns a rest request with method 'Patch'
691691
692692
"""
@@ -696,12 +696,12 @@ def patch(self, path, args=None, body=None, headers=None):
696696
def delete(self, path, args=None, headers=None):
697697
"""Perform a DELETE request
698698
699-
:param path: the URL path.
700-
:type path: str.
701-
:param args: the arguments to delete.
702-
:type args: dict.
703-
:param headers: dict of headers to be appended.
704-
:type headers: dict.
699+
:param path: The URI to access
700+
:type path: str
701+
:param args: The query parameters to provide with the request
702+
:type args: dict, optional
703+
:param body: The request body to provide; use a dict for a JSON body, list for multipart forms, bytes for an octet stream, or str for an unstructured request
704+
:type headers: dict, optional
705705
:returns: returns a rest request with method 'Delete'
706706
707707
"""
@@ -733,18 +733,18 @@ def _rest_request(self, path, method='GET', args=None, body=None,
733733
headers=None, allow_redirects=True):
734734
"""Rest request main function
735735
736-
:param path: path within tree
736+
:param path: The URI to access
737737
:type path: str
738-
:param method: method to be implemented
739-
:type method: str
740-
:param args: the arguments for method
741-
:type args: dict
742-
:param body: body payload for the rest call
743-
:type body: dict
744-
:param headers: provide additional headers
745-
:type headers: dict
746-
:param allow_redirects: controls whether redirects are followed
747-
:type allow_redirects: bool
738+
:param method: The HTTP method to invoke on the URI; GET if not provided
739+
:type method: str, optional
740+
:param args: The query parameters to provide with the request
741+
:type args: dict, optional
742+
:param body: The request body to provide; use a dict for a JSON body, list for multipart forms, bytes for an octet stream, or str for an unstructured request
743+
:type body: dict or list or bytes or str, optional
744+
:param headers: Additional HTTP headers to provide in the request
745+
:type headers: dict, optional
746+
:param allow_redirects: Controls whether redirects are followed
747+
:type allow_redirects: bool, optional
748748
:returns: returns a RestResponse object
749749
750750
"""

src/redfish/ris/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- coding: utf-8 -*-
77
"""

src/redfish/ris/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- coding: utf-8 -*-
77
"""Module for working with global configuration options."""

src/redfish/ris/ris.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- coding: utf-8 -*-
77
"""RIS implementation"""

src/redfish/ris/rmc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- coding: utf-8 -*-
77
"""RMC implementation """

src/redfish/ris/rmc_helper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- coding: utf-8 -*-
77
"""RMC helper implementation"""

src/redfish/ris/sharedtypes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- coding: utf-8 -*-
77
""" Shared types used in this module """

tests/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md

tests/discovery/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md

tests/discovery/test_discovery.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- encoding: utf-8 -*-
77
import unittest

tests/rest/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md

tests/rest/test_v1.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- encoding: utf-8 -*-
77
import unittest

tests/ris/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md

tests/ris/test_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- encoding: utf-8 -*-
77
import tempfile

tests/ris/test_ris.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Notice:
22
# Copyright 2016-2021 DMTF. All rights reserved.
33
# License: BSD 3-Clause License. For full text see link:
4-
# https://github.com/DMTF/python-redfish-library/blob/master/LICENSE.md
4+
# https://github.com/DMTF/python-redfish-library/blob/main/LICENSE.md
55

66
# -*- encoding: utf-8 -*-
77
import unittest

0 commit comments

Comments
 (0)