-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from oracle/release_2018-05-03
Releasing version 1.3.20
- Loading branch information
Showing
79 changed files
with
5,085 additions
and
292 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
httpsig_cffi | ||
============= | ||
Copyright (c) 2014 Adam Knight | ||
Copyright (c) 2012 Adam T. Lindsay (original author) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
docs/api/load_balancer/models/oci.load_balancer.models.CreateHostnameDetails.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CreateHostnameDetails | ||
===================== | ||
|
||
.. currentmodule:: oci.load_balancer.models | ||
|
||
.. autoclass:: CreateHostnameDetails | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
11 changes: 11 additions & 0 deletions
11
docs/api/load_balancer/models/oci.load_balancer.models.Hostname.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Hostname | ||
======== | ||
|
||
.. currentmodule:: oci.load_balancer.models | ||
|
||
.. autoclass:: Hostname | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
11 changes: 11 additions & 0 deletions
11
docs/api/load_balancer/models/oci.load_balancer.models.HostnameDetails.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
HostnameDetails | ||
=============== | ||
|
||
.. currentmodule:: oci.load_balancer.models | ||
|
||
.. autoclass:: HostnameDetails | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
11 changes: 11 additions & 0 deletions
11
docs/api/load_balancer/models/oci.load_balancer.models.UpdateHostnameDetails.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
UpdateHostnameDetails | ||
===================== | ||
|
||
.. currentmodule:: oci.load_balancer.models | ||
|
||
.. autoclass:: UpdateHostnameDetails | ||
:show-inheritance: | ||
:special-members: __init__ | ||
:members: | ||
:undoc-members: | ||
:inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,6 @@ | |
|
||
.. autofunction:: to_dict | ||
|
||
.. autofunction:: file_content_as_launch_instance_user_data | ||
|
||
.. autoclass:: Sentinel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
# This file will be Base64-ed and provided as user_data when launching an instance. | ||
# See: https://docs.us-phoenix-1.oraclecloud.com/api/#/en/iaas/20160918/datatypes/LaunchInstanceDetails | ||
# for more information | ||
|
||
mkdir /tmp/mydir | ||
touch /tmp/mydir/mytxt.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# coding: utf-8 | ||
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. | ||
|
||
from . import httpsig_cffi # noqa: F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# coding: utf-8 | ||
# Modified Work: Copyright (c) 2018, 2018, Oracle and/or its affiliates. All rights reserved. | ||
# Original Work: Copyright (c) 2014 Adam Knight | ||
# Original Work: Copyright (c) 2012 Adam T. Lindsay (original author) | ||
|
||
from .sign import Signer, HeaderSigner # noqa: F401 | ||
from .verify import Verifier, HeaderVerifier # noqa: F401 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# coding: utf-8 | ||
# Modified Work: Copyright (c) 2018, 2018, Oracle and/or its affiliates. All rights reserved. | ||
# Original Work: Copyright (c) 2014 Adam Knight | ||
# Original Work: Copyright (c) 2012 Adam T. Lindsay (original author) | ||
|
||
from requests.auth import AuthBase | ||
try: | ||
# Python 3 | ||
from urllib.parse import urlparse | ||
except ImportError: | ||
# Python 2 | ||
from urlparse import urlparse | ||
|
||
from .sign import HeaderSigner | ||
|
||
|
||
class HTTPSignatureAuth(AuthBase): | ||
''' | ||
Sign a request using the http-signature scheme. | ||
https://github.com/joyent/node-http-signature/blob/master/http_signing.md | ||
key_id is the mandatory label indicating to the server which secret to use | ||
secret is the filename of a pem file in the case of rsa, a password string in the case of an hmac algorithm | ||
algorithm is one of the six specified algorithms | ||
headers is a list of http headers to be included in the signing string, defaulting to "Date" alone. | ||
''' | ||
def __init__(self, key_id='', secret='', algorithm=None, headers=None): | ||
headers = headers or [] | ||
self.header_signer = HeaderSigner( | ||
key_id=key_id, | ||
secret=secret, | ||
algorithm=algorithm, | ||
headers=headers | ||
) | ||
self.uses_host = 'host' in [h.lower() for h in headers] | ||
|
||
def __call__(self, r): | ||
headers = self.header_signer.sign( | ||
r.headers, | ||
# 'Host' header unavailable in request object at this point | ||
# if 'host' header is needed, extract it from the url | ||
host=urlparse(r.url).netloc if self.uses_host else None, | ||
method=r.method, | ||
path=r.path_url | ||
) | ||
r.headers.update(headers) | ||
return r |
Oops, something went wrong.