Skip to content

Commit

Permalink
[Confidential Ledger] GA Data Plane SDK (Azure#24900)
Browse files Browse the repository at this point in the history
* remove duplicate typing

* update version and changelog

* added confidentialledger to tox list and fix issues

* always import typing

* update date in changelog

* fix trailing whitespace

* remove TransactionStatus model

* align get_ledger_entry backoff config api with azure defaults

* update typing for ConfidentialLedgerCertificateCredential

* dpg generation for new version

* small updates

* add pytest configuration

* wip

* the tests ran

* tested identity service client and added test for add cert-based user

* change identity in test

* passed non-async tests

* pass all tests and make recordings

* totally generate using the old way

* update swagger for stable api version

* generate using stable and remove auth

* update ConfidentialLedgerClient init

* patch async init

* overrode all expected client operations

* overrode async

* remove accidental file

* attr -> json

* fix typos

* add https://

* fix imports and credential type checking

* fix method name

* credential to args

* black

* fix some tests

* updated async tests

* fixed entry for range query

* generate identity service so it does not get overriden

* skip url encoding of user id

* generate with autorest python 5.17.0

* pass identity service tests

* remove api version from tests

* build in typical identity service uri

* regenerated

* update identity

* Union[IO, JSON]

* set content-type for create user and fix transaction status check in tests

* fix tests

* fix user tests

* basic readme for samples

* follow retry policy parameter names

* remove post and wait

* remove post_ledger_entry_wait_for_commit from test

* Revert "remove post_ledger_entry_wait_for_commit from test"

This reverts commit 3e4ad98.

* Revert "remove post and wait"

This reverts commit 5cb5b0b.

* add cert user before starting

* add test config files

* remove unnecessary environment vars (set by the ARM template)

* fix non-async test

* GetLedgerEntryPollingMethod

* StatePollingMethod

* complete poller nonasync

* AsyncLroPoller returned

* tests to lro

* tests use pollers

* update arm template

* rename module and add sample

* update readme up to examples

* update readme

* list ledger entries readme and sample

* finish readme

* finish samples

* update CHANGELOG

* retrieve cert at startup

* new recordings for identity service

* check collection id

* list collections

* address pr comments

* rename resource group variable per live test setup

* ran black

* remove ARM template

* add user management samples

* regenerate with fixed swagger

* operations mixin for identity client

* latest tests and recordings

* use confidential ledger id

* updated recordings

* contextmanager for async samples

* update changelog per comments

* put imports in all readme samples

* remove operation prefix in Swagger and regenerate

* remove some examples from readme and start samples section

* samples skeleton

* run list_ledger_entries samples

* updated manage users sample

* get receipt sample

* write to ledger

* use collections

* service verification samples

* fix collections signature

* add aiohttp to requirements

* use uniqueString for ledger name

* set resource location

* update setup.py based on example

* suppress credscan for test secret

* fix super and credential attr

* omit in toc is causing errors and also apparently not necessary locally anymore

* update shared requirements

* pylint fixes

* no more self.assert

* fix super

* deduplicate pollingmethod

* test fixes

* update ledger name

* shorten range query test and add delay to add user

* greatly shorten range query test

* redo recordings

* add known word to cspell

* add PostTestSteps

* reduce flakiness

* add envvars

* remove PostTestSteps

* address edge cases in tests

* autorest 6.0.1

* regenerate with batch

* rerecord

* add comment

* better handling of cls in begin_post_ledger_entry

* fix typo

* fetch TLS certificate automagically

* updated tests and README for new convenience TLS cert fetching

* pass kwargs

* fix credential typo

* identity_service -> certificate

* rename endpoint params

* regen after review and passed tests and samples

* regenerated with latest swagger

* updated per pr comments

* fix pylint

* use tempfile.TemporaryDirectory

* retry ResourceNotFoundError in poller

* address review comments

* uupdate release date
  • Loading branch information
lynshi authored and jeremydvoss committed Jul 21, 2022
1 parent c032922 commit 7bc9dc9
Show file tree
Hide file tree
Showing 159 changed files with 22,165 additions and 37,416 deletions.
6 changes: 6 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,12 @@
"startf",
"dpkg"
]
},
{
"filename": "sdk/confidentialledger/test-resources.bicep",
"words": [
"pysdkci"
]
}
],
"allowCompoundWords": true
Expand Down
17 changes: 14 additions & 3 deletions sdk/confidentialledger/azure-confidentialledger/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
# Release History

## 1.0.0b2 (Unreleased)
## 1.0.0 (2022-07-19)

GA Data Plane Python SDK for Confidential Ledger.

### Bugs Fixed
- User ids that are certificate fingerprints are no longer URL-encoded in the request URI.

### Other Changes
### Breaking Changes
- Removed all models. Methods now return JSON directly.
- `sub_ledger_id` fields are now named `collection_id`.
- `azure.confidentialledger.identity_service` has been renamed to `azure.confidentialledger.certificate`.
- `ConfidentialLedgerIdentityServiceClient` is now `ConfidentialLedgerCertificateClient`.
- `post_ledger_entry` has been renamed to `create_ledger_entry`.

- Python 2.7 is no longer supported. Please use Python version 3.6 or later.
### Other Changes
- Python 2.7 is no longer supported. Please use Python version 3.7 or later.
- Convenience poller methods added for certain long-running operations.
- Add new supported API version: `2022-05-13`.

## 1.0.0b1 (2021-05-12)

Expand Down
452 changes: 237 additions & 215 deletions sdk/confidentialledger/azure-confidentialledger/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

__path__ = __import__("pkgutil").extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -1,46 +1,24 @@
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
# pylint: disable=unused-import
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from ._client import ConfidentialLedgerClient
from ._enums import LedgerUserRole, TransactionState
from ._models import (
AppendResult,
Consortium,
ConsortiumMember,
Constitution,
EnclaveQuote,
LedgerEnclaves,
LedgerEntry,
LedgerUser,
TransactionReceipt,
TransactionStatus,
)
from ._shared import ConfidentialLedgerCertificateCredential
from ._version import VERSION

__version__ = VERSION

__all__ = [
"ConfidentialLedgerCertificateCredential",
"ConfidentialLedgerClient",
# Enums
"LedgerUserRole",
"TransactionState",
# Models
"AppendResult",
"Consortium",
"ConsortiumMember",
"Constitution",
"EnclaveQuote",
"LedgerEnclaves",
"LedgerEntry",
"LedgerUser",
"TransactionReceipt",
"TransactionStatus",
]
try:
from ._patch import __all__ as _patch_all
from ._patch import * # type: ignore # pylint: disable=unused-wildcard-import
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk

__all__ = ["ConfidentialLedgerClient"]
__all__.extend([p for p in _patch_all if p not in __all__])

from ._version import VERSION

__version__ = VERSION
_patch_sdk()
Loading

0 comments on commit 7bc9dc9

Please sign in to comment.