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
cisco_spark -> cisco_webex rename and message option fix #457
cisco_spark -> cisco_webex rename and message option fix #457
Conversation
…is associated with the change of the product name from Cisco Spark to Cisco Webex Teams. In addition, the current version (cisco_spark) does not work due to a name collision with MESSAGE. I had to modify the name from "message" to "webexmsg" in many places in cisco_webex. It works fine in this version. The original author has been preserved and copied from cisco_spark to cisco_webex. @drew-russell The current version of cisco_spark module does not work due to a name collision with MESSAGE. I had to modify the name from "message" to "webexmsg" in many places in cisco_webex.py file. It works fine in this version. The name change is associated with the change of the product name from Cisco Spark to Cisco Webex Teams.
@networkers-pl This PR contains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a breaking change, and needs to be properly documented (changelog fragment, breaking_changes
)!
returned: always | ||
type: int | ||
sample: 200 | ||
|
||
message: | ||
msg: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are removing an existing return value. The old one needs to be deprecated (and not removed) and returned until the deprecation period is over.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there was a collision with the name of the message and therefore the module stopped working, hence the change from message to msg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's for module options, not for return values. Please keep the old name of the return value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking as Request Changes to it is not accidentally merged.
@networkers-pl can the old |
If you open the URLs in a browser, both the old and new API URLs work and return the same thing (no auth token). |
Yes, the old API is still working, but due to the change of product name from Spark to Webex, it is recommended to use the new URL.
… On 4 Jun 2020, at 09:50, Felix Fontein ***@***.***> wrote:
If you open the URLs in a browser, both the old and new API URLs work and return the same thing (no auth token).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#457 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APVNUU5DZA6FXU5O2WSUECLRU5G33ANCNFSM4NSIVNJA>.
|
my bad.. |
I'm starting to make changes.
… On 4 Jun 2020, at 09:41, Felix Fontein ***@***.***> wrote:
@felixfontein commented on this pull request.
This is a breaking change, and needs to be properly documented (changelog fragment, breaking_changes)!
In plugins/modules/notification/cisco_webex.py <#457 (comment)>:
> @@ -10,99 +10,102 @@
DOCUMENTATION = '''
---
-module: cisco_spark
-short_description: Send a message to a Cisco Spark Room or Individual.
+module: cisco_webex
+short_description: Send a msg to a Cisco Webex Teams Room or Individual
⬇️ Suggested change
-short_description: Send a msg to a Cisco Webex Teams Room or Individual
+short_description: Send a message to a Cisco Webex Teams Room or Individual
In plugins/modules/notification/cisco_webex.py <#457 (comment)>:
> description:
- - Send a message to a Cisco Spark Room or Individual with options to control the formatting.
+ - Send a msg to a Cisco Webex Teams Room or Individual with options to control the formatting.
Please use correct English words.
⬇️ Suggested change
- - Send a msg to a Cisco Webex Teams Room or Individual with options to control the formatting.
+ - Send a message to a Cisco Webex Teams Room or Individual with options to control the formatting.
In plugins/modules/notification/cisco_webex.py <#457 (comment)>:
>
options:
recipient_type:
description:
- - The request parameter you would like to send the message to.
+ - The request parameter you would like to send the I(msg) to.
⬇️ Suggested change
- - The request parameter you would like to send the I(msg) to.
+ - The request parameter you would like to send the message to.
This is an English word, not the module option.
In plugins/modules/notification/cisco_webex.py <#457 (comment)>:
>
- message_type:
+ msg_type:
You need to provide an alias. Otherwise existing usage will break.
In plugins/modules/notification/cisco_webex.py <#457 (comment)>:
> description:
- - Specifies how you would like the message formatted.
- required: False
+ - Specifies how you would like the msg formatted.
⬇️ Suggested change
- - Specifies how you would like the msg formatted.
+ - Specifies how you would like the message formatted.
In plugins/modules/notification/cisco_webex.py <#457 (comment)>:
>
personal_token:
description:
- - Your personal access token required to validate the Spark API.
- required: true
- aliases: ['token']
To remove an alias, it needs to be deprecated first, and removed after the deprecation period expired. So please keep this.
In plugins/modules/notification/cisco_webex.py <#457 (comment)>:
> returned: always
type: int
sample: 200
-message:
+msg:
You are removing an existing return value. The old one needs to be deprecated (and not removed) and returned until the deprecation period is over.
In plugins/modules/notification/cisco_webex.py <#457 (comment)>:
> @@ -111,9 +114,9 @@
from ansible.module_utils.urls import fetch_url
-def spark_message(module):
- """ When check mode is specified, establish a read only connection, that does not return any user specific
- data, to validate connectivity. In regular mode, send a message to a Cisco Spark Room or Individual"""
+def spark_msg(module):
+ """When check mode is specified, establish a read only connection, that does not return any user specific
+ data, to validate connectivity. In regular mode, send a msg to a Cisco Webex Teams Room or Individual"""
⬇️ Suggested change
- data, to validate connectivity. In regular mode, send a msg to a Cisco Webex Teams Room or Individual"""
+ data, to validate connectivity. In regular mode, send a message to a Cisco Webex Teams Room or Individual"""
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#457 (review)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APVNUU7JNVQOSVJ3DUL3CUDRU5F2ZANCNFSM4NSIVNJA>.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i thought the api doesn't work..
The test
|
no, the old module does not work. the reason is a collision with "message". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to keep the symlink plugin/modules/cisco_spark.py
(to plugins/modules/notification/cisco_spark.py
), and create a symlink from plugins/modules/notification/cisco_spark.py
pointing to ./cisco_webex.py
.
returned: always | ||
type: int | ||
sample: 200 | ||
|
||
message: | ||
msg: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's for module options, not for return values. Please keep the old name of the return value.
I introduced all suggestions. if I miss or misunderstand something, please let me know. |
type: int | ||
sample: 200 | ||
|
||
msg: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is still missing:
msg: | |
message: |
Also, please adjust the commit messages and remove the |
The test
|
You need to add |
I do not add @ to the commit message. If that's not the case, I can't find any other option anywhere to control it or change it. I am asking for information where I can change it and then I will do it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now from my POV.
@Andersson007 what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I missed one thing: please remove the @
from the commit message of this commit: f2baff7
…argument-name added to tests/sanity/ignore-2.10.txt
fdbcb0b
to
ced3e6e
Compare
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@networkers-pl thanks! |
Thank you both for your help and patience ;-)
… On 7 Jun 2020, at 14:34, Felix Fontein ***@***.***> wrote:
@networkers-pl <https://github.com/networkers-pl> thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#457 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APVNUUZDYS3BZO6O7WEZWP3RVOCMPANCNFSM4NSIVNJA>.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
merged #457 into master |
@networkers-pl my congratulations! thanks for being persistent:) |
…ge is associated with the change of the product name from Cisco Spark to Cisco Webex Teams. In addition, the current version (cisco_spark) does not work due to a name collision with MESSAGE. I had to modify the name from "message" to "msg" in many places in cisco_webex. It works fine in this version.
SUMMARY
new module cisco_webex and old module removal (cisco_spark)
ISSUE TYPE
COMPONENT NAME
cisco_webex
ADDITIONAL INFORMATION
cisco_spark module has been deleted, as it doesn't work anymore.
On May 12, 2020, the API URL also changed.
The old one still works, but now instead of api.ciscospark.com, you should use webexapis.com.
I also added it to the changes.
More details can be found here:
https://developer.webex.com/blog/introducing-the-new-webexapis-com
Also the old links from documentation section didn't work, as Spark is no longer there.
I changed them to other Cisco Webex.