Skip to content

Conversation

@vchavatapalli
Copy link
Contributor

No description provided.

@salesforce-cla
Copy link

Thanks for the contribution! Unfortunately we can't verify the commit author(s): Vineeth Chavatapalli <v***@s***.com> SFDC\vchavatapalli <v***@s***.com>. One possible solution is to add that email to your GitHub account. Alternatively you can change your commits to another email and force push the change. After getting your commits associated with your GitHub account, refresh the status of this Pull Request.

Copy link
Contributor

@jorwoods jorwoods left a comment

Choose a reason for hiding this comment

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

  1. Unit tests are missing for these endpoints.
  2. Can you point to the docs where you found these endpoints that support updating multiple connections at a time? I don't see it anywhere.


@api(version="3.26")
def update_connections(
self, datasource_item: DatasourceItem, connection_luids: list[str], authentication_type: str, username: Optional[str] = None, password: Optional[str] = None, embed_password: Optional[bool] = None
Copy link
Contributor

Choose a reason for hiding this comment

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

Should accept an Iterable[ConnectionItem] rather than taking a list of ids and then Connection attributes as keyword args.


# Update workbook_connections
@api(version="3.26")
def update_connections(self, workbook_item: WorkbookItem, connection_luids: list[str], authentication_type: str, username: Optional[str] = None, password: Optional[str] = None, embed_password: Optional[bool] = None
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as datasource method.


url = f"{self.baseurl}/{datasource_item.id}/connections"

ts_request = Element("tsRequest")
Copy link
Contributor

Choose a reason for hiding this comment

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

Creating the XML payload belongs in the request_factory.


def _interval_type_pairs(self):
return [(IntervalItem.Occurrence.MonthDay, self.interval)]
return [(IntervalItem.Occurrence.MonthDay, str(day)) for day in self.interval]
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants