Skip to content

Commit

Permalink
[AutoPR] restapi_auto_graphrbac/data-plane (#2032)
Browse files Browse the repository at this point in the history
* Generated from 282617e562ce86949c550d7aaf5e10fb86552272 (#2013)

Added custom key identifier

* [AutoPR graphrbac/data-plane] Added OAuth2 GET and POST to GraphRBAC.json spec (#3063)

* Generated from 7e6768db7f5cf3600aa596cf9c488c6b5ca34ca2

OAuth2 Permissions added to GraphRBAC stable

* Generated from dfc2c5676d5c7be8c4ec55a4356e36cc677ee916

OAuth2Permissions and added Service Principal query by AppId

* Generated from 6aa96687989842d043047ab3b93cd2e5e66b5dd5

OAuth2 Permissions added to GraphRBAC stable cleanup and validate

* Generated from d2bcb30a79b50cc976ba2b049ff780f8ab8d8292

Permissions added to GraphRBAC model rename and linter issues addressed

* Generated from 34825096e936c6c8ee69981113b58cd094f18e8f

Add description to post body for OAuth2 Permissions

* Rebuild by #2032

* Fix test for GraphRbac and Autorest 3.x

* Packaging update of azure-graphrbac

* [AutoPR graphrbac/data-plane] GraphRBAC (#3244)

* Generated from 38da2338b7f2a290829acc0a0cd49cf1edc4cc0b

Backward compat for ApplicationAddOwnerParameter

* Generated from cdebe8cf0d91d18108365b4a12041034983e9c93

Fix pageable

* Generated from b4cbab2542757412fd65a260fce4db66402f7339

Odata support for me/ownedObjects

* Generated from cdebe8cf0d91d18108365b4a12041034983e9c93

Fix pageable

* Generated from 89ee79b8d1b444917dc0f8962ecfaf6a9cfa3328

Rename list deleted apps

* Generated from 876ad7a85c38b9cebaf850cc330e9426c1cf6b37

Fix pageable

* Generated from fd2fd304255560910d77c7c6a9befe9463f9435c

Add filter to list deletedApp

* Generated from 8128b10ff61e1bfa9804116016b123bc3f3eb472

ListOwnedObject next

* Generated from 3a866e49fbfe1527711a06527c86e3834d049ad8

AppRoles to create/update

* Test SignedInUser

* Test deleted apps

* Test AppRoles

* Generated from 04d197ad2a8922a79bd2ea253b07aff0175d4f87

Add SP update

* Generated from 48aa8260d0f81091922fd75f5b5f2038f99ca4dc

Add SP update

* Generated from f338c565c9b0d1073820c866848e3003e36bd15d

Add SP update

* SP update

* Generated from 0e9e02eb70d464b996b5870f0a25d7be243fe1ac

Breaking changes to clean-up

* Generated from 9c0eebd27cb20ef36a1f377d3550bebce47b0def

Fix doc

* Generated from 203554316693c183cd5e1c03f4cac598e42c4ed8

Remove incorrect required

* Packaging update of azure-graphrbac

* Test get_objects_by_object_ids

* Packaging update of azure-graphrbac

* Update version.py

* Packaging update of azure-graphrbac

* Generated from 3854ef67da587db1215bfdd4cba1d34bcd2ebc79 (#3533)

Update graphrbac.json

* Rebuild by #2032

* 0.50.0 ChangeLog

* Remove deprecated file
  • Loading branch information
lmazuel authored Oct 10, 2018
1 parent 70041a3 commit 8275dce
Show file tree
Hide file tree
Showing 87 changed files with 6,463 additions and 1,135 deletions.
60 changes: 60 additions & 0 deletions azure-graphrbac/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,66 @@
Release History
===============

0.50.0 (2018-10-10)
+++++++++++++++++++

**Features**

- signed_in_user.get : Return the currently logged-in User object
- signed_in_user.list_owned_objects : All objects owned by current user
- deleted_applications.restore : Restore an application deleted in the last 30 days
- deleted_applications.list : List all applications deleted in the last 30 days
- deleted_applications.hard_delete : Delete for real an application in the deleted list
- groups.list_owners : List owner of the group
- groups.add_owner : Add owner to this group
- Application and ServicePrincipals have now the attribute "app_roles" which is a list of AppRole class. To implement this.
- Client class can be used as a context manager to keep the underlying HTTP session open for performance
- Model ADGroup has a attributes mail_enabled and mail_nickname
- Model KeyCredential has a new atrribute custom_key_identifier
- Added operation group oauth2_operations (operations "get" and "grant")

**Bug fixes**

- Fix applications.list_owners access to next page
- Fix service_principal.list_owners access to next page

**Breaking changes**

- ApplicationAddOwnerParameters has been renamed AddOwnerParameters
- objects.get_current_user has been removed. Use signed_in_user.get instead. The main difference is this new method returns a DirectoryObjectList, where every elements could be sub-type of DirectoryObject (User, Group, etc.)
- objects.get_objects_by_object_ids now returns a DirectoryObjectList, where every element could be sub-type of DirectoryObject (User, Group, etc.)
- GetObjectsParameters.include_directory_object_references is no longer required.
- Groups.get_members now returns a DirectoryObjectList, where every element could be sub-type of DirectoryObject (User, Group, etc.)

**General Breaking changes**

This version uses a next-generation code generator that *might* introduce breaking changes.

- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments.
To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments.
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
While this is not a breaking change, the distinctions are important, and are documented here:
https://docs.python.org/3/library/enum.html#others
At a glance:

- "is" should not be used at all.
- "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered.

- New Long Running Operation:

- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
the response of the initial call will be returned without polling.
- `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`.
- `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away.

**Note**

- azure-mgmt-nspkg is not installed anymore on Python 3 (PEP420-based namespace package)

0.40.0 (2018-02-05)
+++++++++++++++++++

Expand Down
29 changes: 22 additions & 7 deletions azure-graphrbac/azure/graphrbac/graph_rbac_management_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@
# regenerated.
# --------------------------------------------------------------------------

from msrest.service_client import ServiceClient
from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.objects_operations import ObjectsOperations
from .operations.signed_in_user_operations import SignedInUserOperations
from .operations.applications_operations import ApplicationsOperations
from .operations.deleted_applications_operations import DeletedApplicationsOperations
from .operations.groups_operations import GroupsOperations
from .operations.service_principals_operations import ServicePrincipalsOperations
from .operations.users_operations import UsersOperations
from .operations.objects_operations import ObjectsOperations
from .operations.domains_operations import DomainsOperations
from .operations.oauth2_operations import OAuth2Operations
from . import models


Expand Down Expand Up @@ -54,24 +57,30 @@ def __init__(
self.tenant_id = tenant_id


class GraphRbacManagementClient(object):
class GraphRbacManagementClient(SDKClient):
"""The Graph RBAC Management Client
:ivar config: Configuration for client.
:vartype config: GraphRbacManagementClientConfiguration
:ivar objects: Objects operations
:vartype objects: azure.graphrbac.operations.ObjectsOperations
:ivar signed_in_user: SignedInUser operations
:vartype signed_in_user: azure.graphrbac.operations.SignedInUserOperations
:ivar applications: Applications operations
:vartype applications: azure.graphrbac.operations.ApplicationsOperations
:ivar deleted_applications: DeletedApplications operations
:vartype deleted_applications: azure.graphrbac.operations.DeletedApplicationsOperations
:ivar groups: Groups operations
:vartype groups: azure.graphrbac.operations.GroupsOperations
:ivar service_principals: ServicePrincipals operations
:vartype service_principals: azure.graphrbac.operations.ServicePrincipalsOperations
:ivar users: Users operations
:vartype users: azure.graphrbac.operations.UsersOperations
:ivar objects: Objects operations
:vartype objects: azure.graphrbac.operations.ObjectsOperations
:ivar domains: Domains operations
:vartype domains: azure.graphrbac.operations.DomainsOperations
:ivar oauth2: OAuth2 operations
:vartype oauth2: azure.graphrbac.operations.OAuth2Operations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
Expand All @@ -85,22 +94,28 @@ def __init__(
self, credentials, tenant_id, base_url=None):

self.config = GraphRbacManagementClientConfiguration(credentials, tenant_id, base_url)
self._client = ServiceClient(self.config.credentials, self.config)
super(GraphRbacManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '1.6'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.objects = ObjectsOperations(
self.signed_in_user = SignedInUserOperations(
self._client, self.config, self._serialize, self._deserialize)
self.applications = ApplicationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.deleted_applications = DeletedApplicationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.groups = GroupsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.service_principals = ServicePrincipalsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.users = UsersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.objects = ObjectsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.domains = DomainsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.oauth2 = OAuth2Operations(
self._client, self.config, self._serialize, self._deserialize)
108 changes: 72 additions & 36 deletions azure-graphrbac/azure/graphrbac/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,74 @@
# regenerated.
# --------------------------------------------------------------------------

from .graph_error import GraphError, GraphErrorException
from .directory_object import DirectoryObject
from .key_credential import KeyCredential
from .password_credential import PasswordCredential
from .resource_access import ResourceAccess
from .required_resource_access import RequiredResourceAccess
from .application_create_parameters import ApplicationCreateParameters
from .application_update_parameters import ApplicationUpdateParameters
from .application import Application
from .application_add_owner_parameters import ApplicationAddOwnerParameters
from .key_credentials_update_parameters import KeyCredentialsUpdateParameters
from .password_credentials_update_parameters import PasswordCredentialsUpdateParameters
from .aad_object import AADObject
from .group_add_member_parameters import GroupAddMemberParameters
from .group_create_parameters import GroupCreateParameters
from .ad_group import ADGroup
from .group_get_member_groups_parameters import GroupGetMemberGroupsParameters
from .check_group_membership_parameters import CheckGroupMembershipParameters
from .check_group_membership_result import CheckGroupMembershipResult
from .service_principal_create_parameters import ServicePrincipalCreateParameters
from .service_principal import ServicePrincipal
from .password_profile import PasswordProfile
from .user_base import UserBase
from .user_create_parameters import UserCreateParameters
from .user_update_parameters import UserUpdateParameters
from .sign_in_name import SignInName
from .user import User
from .user_get_member_groups_parameters import UserGetMemberGroupsParameters
from .get_objects_parameters import GetObjectsParameters
from .domain import Domain
from .aad_object_paged import AADObjectPaged
from .application_paged import ApplicationPaged
try:
from .graph_error_py3 import GraphError, GraphErrorException
from .directory_object_py3 import DirectoryObject
from .key_credential_py3 import KeyCredential
from .password_credential_py3 import PasswordCredential
from .resource_access_py3 import ResourceAccess
from .required_resource_access_py3 import RequiredResourceAccess
from .app_role_py3 import AppRole
from .application_create_parameters_py3 import ApplicationCreateParameters
from .application_update_parameters_py3 import ApplicationUpdateParameters
from .application_py3 import Application
from .add_owner_parameters_py3 import AddOwnerParameters
from .key_credentials_update_parameters_py3 import KeyCredentialsUpdateParameters
from .password_credentials_update_parameters_py3 import PasswordCredentialsUpdateParameters
from .group_add_member_parameters_py3 import GroupAddMemberParameters
from .group_create_parameters_py3 import GroupCreateParameters
from .ad_group_py3 import ADGroup
from .group_get_member_groups_parameters_py3 import GroupGetMemberGroupsParameters
from .check_group_membership_parameters_py3 import CheckGroupMembershipParameters
from .check_group_membership_result_py3 import CheckGroupMembershipResult
from .service_principal_create_parameters_py3 import ServicePrincipalCreateParameters
from .service_principal_update_parameters_py3 import ServicePrincipalUpdateParameters
from .service_principal_py3 import ServicePrincipal
from .password_profile_py3 import PasswordProfile
from .user_base_py3 import UserBase
from .user_create_parameters_py3 import UserCreateParameters
from .user_update_parameters_py3 import UserUpdateParameters
from .sign_in_name_py3 import SignInName
from .user_py3 import User
from .user_get_member_groups_parameters_py3 import UserGetMemberGroupsParameters
from .get_objects_parameters_py3 import GetObjectsParameters
from .domain_py3 import Domain
from .permissions_py3 import Permissions
except (SyntaxError, ImportError):
from .graph_error import GraphError, GraphErrorException
from .directory_object import DirectoryObject
from .key_credential import KeyCredential
from .password_credential import PasswordCredential
from .resource_access import ResourceAccess
from .required_resource_access import RequiredResourceAccess
from .app_role import AppRole
from .application_create_parameters import ApplicationCreateParameters
from .application_update_parameters import ApplicationUpdateParameters
from .application import Application
from .add_owner_parameters import AddOwnerParameters
from .key_credentials_update_parameters import KeyCredentialsUpdateParameters
from .password_credentials_update_parameters import PasswordCredentialsUpdateParameters
from .group_add_member_parameters import GroupAddMemberParameters
from .group_create_parameters import GroupCreateParameters
from .ad_group import ADGroup
from .group_get_member_groups_parameters import GroupGetMemberGroupsParameters
from .check_group_membership_parameters import CheckGroupMembershipParameters
from .check_group_membership_result import CheckGroupMembershipResult
from .service_principal_create_parameters import ServicePrincipalCreateParameters
from .service_principal_update_parameters import ServicePrincipalUpdateParameters
from .service_principal import ServicePrincipal
from .password_profile import PasswordProfile
from .user_base import UserBase
from .user_create_parameters import UserCreateParameters
from .user_update_parameters import UserUpdateParameters
from .sign_in_name import SignInName
from .user import User
from .user_get_member_groups_parameters import UserGetMemberGroupsParameters
from .get_objects_parameters import GetObjectsParameters
from .domain import Domain
from .permissions import Permissions
from .directory_object_paged import DirectoryObjectPaged
from .application_paged import ApplicationPaged
from .key_credential_paged import KeyCredentialPaged
from .password_credential_paged import PasswordCredentialPaged
from .ad_group_paged import ADGroupPaged
Expand All @@ -60,20 +95,21 @@
'PasswordCredential',
'ResourceAccess',
'RequiredResourceAccess',
'AppRole',
'ApplicationCreateParameters',
'ApplicationUpdateParameters',
'Application',
'ApplicationAddOwnerParameters',
'AddOwnerParameters',
'KeyCredentialsUpdateParameters',
'PasswordCredentialsUpdateParameters',
'AADObject',
'GroupAddMemberParameters',
'GroupCreateParameters',
'ADGroup',
'GroupGetMemberGroupsParameters',
'CheckGroupMembershipParameters',
'CheckGroupMembershipResult',
'ServicePrincipalCreateParameters',
'ServicePrincipalUpdateParameters',
'ServicePrincipal',
'PasswordProfile',
'UserBase',
Expand All @@ -84,9 +120,9 @@
'UserGetMemberGroupsParameters',
'GetObjectsParameters',
'Domain',
'AADObjectPaged',
'ApplicationPaged',
'Permissions',
'DirectoryObjectPaged',
'ApplicationPaged',
'KeyCredentialPaged',
'PasswordCredentialPaged',
'ADGroupPaged',
Expand Down
Loading

0 comments on commit 8275dce

Please sign in to comment.