8000 Bugfix 66 add create group basic by graysonarts · Pull Request #69 · tableau/server-client-python · GitHub
[go: up one dir, main page]

Skip to content

Bugfix 66 add create group basic #69

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 5 commits into from
Oct 20, 2016

Conversation

graysonarts
Copy link
Contributor

@bryantbhowell - I think you are looking for some ability to create groups. Groups are handled in two separate ways even though it's the same create endpoint in the server.

This handles creating basic groups, but AD group imports are a bit more complicated (because they are done in the background). Do you need AD imports immediately?

8000
<tsResponse xmlns="http://tableau.com/api"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tableau.com/api http://tableau.com/api/ts-api-2.3.xsd">
<job id="job-id" mode="Asynchronous" type="GroupImport"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is there for future tests? We don't currently let people trigger an async import.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, that's for a future test when I implement import() (see comment above about AD import)

url = self.baseurl
create_req = RequestFactory.Group.create_req(group_item)
server_response = self.post_request(url, create_req)
new_group = GroupItem.from_response(server_response.content)[0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what our standard is but we could probably just put "return" here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@LGraber
Copy link
Contributor
LGraber commented Oct 20, 2016

We should have a quick chat about what the api should look like for importing an AD group. I don't want to ship something too quickly and then have the signature not work for the future. Besides that ... it looks good.

@graysonarts graysonarts added this to the 0.2 milestone Oct 20, 2016
Copy link
Collaborator
@t8y8 t8y8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

A request for the tests

response_xml = f.read().decode('utf-8')
with requests_mock.mock() as m:
m.post(self.baseurl, text=response_xml)
group_to_create = TSC.GroupItem('test')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I be high maintenance and request a non-ascii name in a test as well?

I just remember some bugs in early sample code and libs prototypes around this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, any suggestions on appropriate words or should I just start finding interesting looking utf-8 characters?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got a favorite foreign language?

I used "蚵仔煎" because it's my favorite street food in the entire world...

@LGraber
Copy link
Contributor
LGraber commented Oct 20, 2016

🚀

@graysonarts graysonarts force-pushed the bugfix-66-add-create-group-basic branch from 8b4e59a to 569df2a Compare October 20, 2016 21:16
@t8y8
Copy link
Collaborator
t8y8 commented Oct 20, 2016

🚀 🚀

@graysonarts graysonarts merged commit eb91b41 into development Oct 20, 2016
@graysonarts graysonarts deleted the bugfix-66-add-create-group-basic branch October 20, 2016 21:26
@graysonarts
Copy link
Contributor Author

Addresses creation of groups for #66 . Importing is not currently supported.

bryceglarsen pushed a commit to bryceglarsen/server-client-python that referenced this pull request Dec 28, 2023
Enable a prototypical API for creating new connections and datasources from scratch.
This uses ET to do XML manipulation, and is hard coded to "10.0" style integrated connections.

This will go away with the new editor/physical/logical model work underway, but it fixes a bug and will let us play around for now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0