Skip to content

Commit

Permalink
Key Vault: Design board changes (Azure#7635)
Browse files Browse the repository at this point in the history
* switched vault_url to vault_endpoint across key vault

* moved enabled and tags to kwargs

* changed the name parameter for get_policy and update_policy to certificate_name

* updated changelog

* [Core] Updated release notes (Azure#7627)

* Core doc fix (Azure#7638)

* Fix azure-core examples

* Fix azure-core Readme

* Simplify doc

* Kill common.py file

* Remove tracing.ext

* update app config doc (Azure#7618)

* update app config doc

* move match_condition to internal

* [AutoPR] netapp/resource-manager (Azure#7092)

* Generated from 34d744550227bee7b380604d38fc1de6c9af6397 (Azure#7089)

Update netapp.json

* changelog for netapp

* ANF-374 update for R5 RP version 2019-07-01 API

* ANF-374 update for R5 RP version 2019-07-01 API (Azure#7460)

* ANF-374 update for R5 RP version 2019-07-01 API

* ANF-374 update for R5 RP version 2019-07-01 API

* ANF-374 update for R5 RP version 2019-07-01 API

* extending pypy timeout. (Azure#7640)

* Eventhubs preview4 merge to master (Azure#7605)

* [EventHubs] Eventhubs runtime metric (Azure#7431)

* runtime metric init commit

* evenhubts-runtime-metric implementation

* Update code, and test and docstring

* Add example code

* Update property name

* Update name to last enqueued event properties

* Eventhubs remove iot and linkredirect (Azure#7450)

* Remove iothub/link-redirect related code

* Remove self._running from consumer and producer

* Remove IoT related params "operation" and "device"

* Remove exception from close()

* add iterator long running test

* small bug fix

* small bug fix

* Fix connection properties bug and format

* Changed product to azure-eventhub in user agent

* Fix a type hint

* Improve stress script

* Print to console configurable

* small changes

* Disable tracking last enqueued event properties for uamqp 1.2.2

* use different consumer group

* fix an issue about consumer group

* fix an issue about consumer group

* Fix a get_properties bug

* [EventHubs] Performance improvement (Azure#7533)

* performance improvement

* batch offset

* Review feedback

* Remove lazy parse in EventData

* Add annotation assertions

* Small fix for missing annotation initialization (Azure#7575)

* Python EventHubs test code revamp (Azure#7594)

* fix pylint error

* fix mypy error

* fix for 2.7

* fix for 2.7

* Sleep 300 seconds to test reconnect

* Remove Pypy from eventhub live test

* Remove Pypy from eventhub live test

* Add "Matrix:"

* Fix bug passing timeout in seconds to uamqp

* update checkpointstore HISTORY

* [EventHubs] Update documentations (Azure#7603)

* Update docs

* Update iothub related description

* Docs update

* Small fix

* Small fix

* revert setup.py

* Resolve Global Install Errors (Azure#7642)

* swapping all dev_requirements to leverage the non-develop mode. opencensus-tracing will fail if azure-core is installed in dev mode. all the rest of the tests are ok with using non-dev, so this seems to be a good compromise

* Setup core for unified pipelines. (Azure#7577)

* Setup core for unified pipelines.

* Added open census to the core pipeline (can be released independently).

* Publish the packages artifact. (Azure#7643)

* Enable template for unified templates. (Azure#7644)

* Setup template for UP.

* Fixed service directory.

* ensure error_map is used consistently and correctly (Azure#7637)

* switched vault_url to vault_endpoint across key vault

* ran black on keyvault

* reverted <<<HEAD additions to code

* got rid of black changes that broke python 3.5
  • Loading branch information
iscai-msft authored and yijxie committed Oct 9, 2019
1 parent b2b075f commit f937bf4
Show file tree
Hide file tree
Showing 79 changed files with 637 additions and 473 deletions.
4 changes: 3 additions & 1 deletion sdk/keyvault/azure-keyvault-certificates/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ as certain properties of `Certificate` (such as `version`) have to be accessed
through the `properties` property. See the updated [docs]
(https://azure.github.io/azure-sdk-for-python/ref/azure.keyvault.certificates.html)
for details.
- `update_certificate` has been renamed to `update_certificate_propertie`
- `update_certificate` has been renamed to `update_certificate_properties`
- The `vault_url` parameter of `CertificateClient` has been renamed to `vault_endpoint`
- The property `vault_url` has been renamed to `vault_endpoint` in all models.

## 4.0.0b3 (2019-09-11)
Version 4.0.0b3 is the first preview of our efforts to create a user-friendly and Pythonic client library for Azure Key Vault's certificates.
Expand Down
6 changes: 3 additions & 3 deletions sdk/keyvault/azure-keyvault-certificates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ names):
}
```
> The `"vaultUri"` property is the `vault_url` used by `CertificateClient`
> The `"vaultUri"` property is the `vault_endpoint` used by `CertificateClient`
### Authenticate the client
In order to interact with a Key Vault's certificates, you'll need an instance
Expand Down Expand Up @@ -116,7 +116,7 @@ from azure.keyvault.certificates import CertificateClient
credential = DefaultAzureCredential()
# Create a new certificate client using the default credential
certificate_client = CertificateClient(vault_url=<your-vault-url>, credential=credential)
certificate_client = CertificateClient(vault_endpoint=<your-vault-url>, credential=credential)
```
## Key concepts
With a `CertificateClient` you can get certificates from the vault, create new certificates and
Expand Down Expand Up @@ -278,7 +278,7 @@ file_handler = logging.FileHandler(filename)
logger.addHandler(file_handler)
# Enable network trace logging. Each HTTP request will be logged at DEBUG level.
client = CertificateClient(vault_url=url, credential=credential, logging_enable=True))
client = CertificateClient(vault_endpoint=url, credential=credential, logging_enable=True))
```
Network trace logging can also be enabled for any single operation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"KeyVaultClientBase",
]

_VaultId = namedtuple("VaultId", ["vault_url", "collection", "name", "version"])
_VaultId = namedtuple("VaultId", ["vault_endpoint", "collection", "name", "version"])


def parse_vault_id(url):
Expand All @@ -40,7 +40,7 @@ def parse_vault_id(url):
raise ValueError("'{}' is not not a valid vault url".format(url))

return _VaultId(
vault_url="{}://{}".format(parsed_uri.scheme, parsed_uri.hostname),
vault_endpoint="{}://{}".format(parsed_uri.scheme, parsed_uri.hostname),
collection=path[0],
name=path[1],
version=path[2] if len(path) == 3 else None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _create_config(credential: "TokenCredential", api_version: str = None, **kwa

def __init__(
self,
vault_url: str,
vault_endpoint: str,
credential: "TokenCredential",
transport: AsyncHttpTransport = None,
api_version: str = None,
Expand All @@ -70,10 +70,10 @@ def __init__(
"credential should be an object supporting the TokenCredential protocol, "
"such as a credential from azure-identity"
)
if not vault_url:
raise ValueError("vault_url must be the URL of an Azure Key Vault")
if not vault_endpoint:
raise ValueError("vault_endpoint must be the URL of an Azure Key Vault")

self._vault_url = vault_url.strip(" /")
self._vault_endpoint = vault_endpoint.strip(" /")

client = kwargs.pop("generated_client", None)
if client:
Expand Down Expand Up @@ -109,5 +109,5 @@ def _build_pipeline(config: Configuration, transport: AsyncHttpTransport, **kwar
return AsyncPipeline(transport, policies=policies)

@property
def vault_url(self) -> str:
return self._vault_url
def vault_endpoint(self) -> str:
return self._vault_endpoint
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ def _create_config(credential, api_version=None, **kwargs):

return config

def __init__(self, vault_url, credential, transport=None, api_version=None, **kwargs):
def __init__(self, vault_endpoint, credential, transport=None, api_version=None, **kwargs):
# type: (str, TokenCredential, Optional[HttpTransport], Optional[str], **Any) -> None
if not credential:
raise ValueError(
"credential should be an object supporting the TokenCredential protocol, "
"such as a credential from azure-identity"
)
if not vault_url:
raise ValueError("vault_url must be the URL of an Azure Key Vault")
if not vault_endpoint:
raise ValueError("vault_endpoint must be the URL of an Azure Key Vault")

self._vault_url = vault_url.strip(" /")
self._vault_endpoint = vault_endpoint.strip(" /")

client = kwargs.pop("generated_client", None)
if client:
Expand Down Expand Up @@ -101,6 +101,6 @@ def _build_pipeline(self, config, transport, **kwargs):
return Pipeline(transport, policies=policies)

@property
def vault_url(self):
def vault_endpoint(self):
# type: () -> str
return self._vault_url
return self._vault_endpoint
Loading

0 comments on commit f937bf4

Please sign in to comment.