Skip to content

[AutoPR] restapi_auto_graphrbac/data-plane #2032

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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