Skip to content

Support HttpHeaders in create_subscription#2224

Merged
jtopjian merged 1 commit intogophercloud:masterfrom
iurygregory:master
Oct 5, 2021
Merged

Support HttpHeaders in create_subscription#2224
jtopjian merged 1 commit intogophercloud:masterfrom
iurygregory:master

Conversation

@iurygregory
Copy link
Copy Markdown
Contributor

@iurygregory iurygregory commented Oct 3, 2021

For #1429

This commit adds support for HttpHeaders in the create_subscription. (#2201)
It was added during the Xena release of Ironic in [1] after the
initial support for create subscriptions [2]

We don't need to modify the response of get_subscription because
redfish doesn't return the value of the HttpHeaders for the enduser.

[1] https://review.opendev.org/c/openstack/ironic/+/806859
[2] https://review.opendev.org/c/openstack/ironic/+/801064

This commit adds support for HttpHeaders in the create_subscription.
It was added during the Xena release of Ironic in [1] after the
initial support for create subscriptions [2]

We don't need to modify the response of get_subscription because
redfish doesn't return the value of the HttpHeaders for the enduser.

[1] https://review.opendev.org/c/openstack/ironic/+/806859
[2] https://review.opendev.org/c/openstack/ironic/+/801064
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 79.814% when pulling 687661f on iurygregory:master into 2e4a09a on gophercloud:master.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Oct 3, 2021

Build failed.

@iurygregory
Copy link
Copy Markdown
Contributor Author

I've tested locally in a setup with Ironic.

@jtopjian
Copy link
Copy Markdown
Contributor

jtopjian commented Oct 5, 2021

@iurygregory I apologize for the delay? Is this ready to review/merge?

@iurygregory
Copy link
Copy Markdown
Contributor Author

Hi @jtopjian , no worries (the PR is only 2 days old)! Yes, it's ready for review/merge, I've tested locally and from the logs it confirms that Ironic received the information I've sent.

Oct 03 21:24:05 localhost ironic-api[524943]: 2021-10-03 21:24:05.040 524956 DEBUG ironic_lib.json_rpc.client [req-d1226ac7-85ab-4444-a744-32e7a65e409a bifrost_user - - - -] RPC vendor_passthru with {'jsonrpc': '2.0', 'method': 'vendor_passthru', 'params': {'node_id': 'c5a2bcdb-0ead-4162-a5ce-ea3f23929a87', 'driver_method': 'create_subscription', 'http_method': 'POST', 'info': {'Context': 'gophercloud', 'Destination': 'https://mywebserver.com/RedfishEvents/Events.php', 'HttpHeaders': [{'Content-Type': 'application/json'}]}, 'context': {'user': 'bifrost_user', 'tenant': None, 'system_scope': None, 'project': None, 'domain': None, 'user_domain': None, 'project_domain': None, 'is_admin': False, 'read_only': False, 'show_deleted': False, 'auth_token': '***', 'request_id': 'req-d1226ac7-85ab-4444-a744-32e7a65e409a', 'global_request_id': None, 'resource_uuid': None, 'roles': [], 'user_identity': 'bifrost_user - - - -', 'is_admin_project': True}, 'rpc.version': '1.20'}, 'id': 'req-d1226ac7-85ab-4444-a744-32e7a65e409a'} _request /opt/stack/bifrost/lib64/python3.6/site-packages/ironic_lib/json_rpc/client.py:187
Oct 03 21:24:12 localhost ironic-api[524943]: 2021-10-03 21:24:12.731 524956 INFO eventlet.wsgi.server [req-d1226ac7-85ab-4444-a744-32e7a65e409a bifrost_user - - - -] 192.168.122.1 "POST /nodes/c5a2bcdb-0ead-4162-a5ce-ea3f23929a87/vendor_passthru?method=create_subscription HTTP/1.1" status: 200  len: 488 time: 8.3141353

@jtopjian
Copy link
Copy Markdown
Contributor

jtopjian commented Oct 5, 2021

@iurygregory sounds good - thanks! The OpenLab failure can be ignored.

Copy link
Copy Markdown
Contributor

@jtopjian jtopjian left a comment

Choose a reason for hiding this comment

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

LGTM - thank you!

@jtopjian jtopjian merged commit f581ce6 into gophercloud:master Oct 5, 2021
@iurygregory
Copy link
Copy Markdown
Contributor Author

@jtopjian would be possible to publish a new tag with the new features? Since 0.21.0 is 23 days old. Thanks!

@jtopjian
Copy link
Copy Markdown
Contributor

jtopjian commented Oct 7, 2021

@iurygregory I got a notification about a release request. Would you still like a release made?

edit: oh, GitHub was acting weird. I got an email notification but didn't see the comment on the site. It appeared when I made my last comment.

I'll create one now.

@jtopjian
Copy link
Copy Markdown
Contributor

jtopjian commented Oct 7, 2021

@iurygregory https://github.com/gophercloud/gophercloud/releases/tag/v0.22.0 should be good to go.

@iurygregory
Copy link
Copy Markdown
Contributor Author

Thanks!

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.

4 participants