-
Notifications
You must be signed in to change notification settings - Fork 436
Update a group #277
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
Comments
We'd be happy to take a look at a PR. I suspect the reason it wasn't added was because it's a little complex with AD vs Local auth Servers. Could you post your proposed API design (Signatures in both cases, maybe types) here before you spend too much time building out a PR? |
I think that I need to add function update to groups_endpoint.py: def update(self, group_item, default_site_role=UserItem.Roles.Unlicensed):
url = "{0}/{1}".format(self.baseurl, group_item.id)
update_req = RequestFactory.Group.update_req(group_item, default_site_role)
server_response = self.put_request(url, update_req)
logger.info('Updated group item (ID: {0})'.format(group_item.id)) |
And define in request_factiory.GroupRequest something like this: def update_req(self, group_item, default_site_role):
xml_request = ET.Element('tsRequest')
group_element = ET.SubElement(xml_request, 'group')
group_element.attrib['name'] = group_item.name
if group_item.domain_name != 'local':
project_element = ET.SubElement(group_element, 'import')
project_element.attrib['source'] = "ActiveDirectory"
project_element.attrib['domainName'] = group_item.domain_name
project_element.attrib['siteRole'] = default_site_role
return ET.tostring(xml_request) |
@t8y8, what would you say about my design? |
I'm on vacation so this is just a quick glance but it looks like a reasonable direction! We want the request to be able to handle the local auth case as well... (I'm a but fuzzy on details for what that case even allows...) Any ideas there? |
Ignore that last comment. Your code handles that. Would you be able to implement the j 8000 obId and status tracking code as well (I think it's ok if that's a second PR, but wondering if you'd like to) |
@t8y8, ok, sure, no problem, I'll implement jobId and status! |
Cool, thanks! You should implement the "synchronous" case first and submit a PR, then do the jobId stuff in a second PR, I suspect it would require more discussion/iteration so may as well land the other stuff first. |
Created #279 |
Closing as the merge was completed. |
What about method Update group?
There is no one in groups_endpoind.
I can create a PR if needed.
The text was updated successfully, but these errors were encountered: