Skip to content
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

NMS-16994: Export NMS Inventory and Alarms #7574

Open
wants to merge 10 commits into
base: foundation-2024
Choose a base branch
from

Conversation

naeem-afzal
Copy link

External References

Copy link
Contributor

@cgorantla cgorantla left a comment

Choose a reason for hiding this comment

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

This seems fine.

Add another gRPC Client for Alarms/Inventory.

Rename existing GrpcExporterClient as GrpcExporter. This will handle config related to connection.

Existing grpc client code could be moved into BsmGrpcClient.
Create new AlarmInventoryGrpcClient which adds support for sending this proto.

let me know if you have any other questions.

@naeem-afzal
Copy link
Author

naeem-afzal commented Jan 6, 2025

This seems fine.

Add another gRPC Client for Alarms/Inventory.

Rename existing GrpcExporterClient as GrpcExporter. This will handle config related to connection.

Existing grpc client code could be moved into BsmGrpcClient. Create new AlarmInventoryGrpcClient which adds support for sending this proto.

let me know if you have any other questions.

@cgorantla :

Going to implement above changes as mentioned under here, kindly let me know if its fine, thanks:

  1. Creating new "GrpcExporter" class as abstract class to handle config related to connection, all GRPC clients will extend it.
  2. Refactoring existing logic into a new class "BsmGrpcClient" by extending GrpcExporter.
  3. Creating new class "AlarmInventoryGrpcClient" by extending GrpcExporter and with new business logic and support of new proto.

Will push new changes into same PR.

Base automatically changed from cg/jira/NMS-16991 to foundation-2024 January 6, 2025 20:36
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ naeem-afzal
❌ Chandra Gorantla


Chandra Gorantla seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment on lines 131 to 132
string foreign_type = 1;
string foreign_source = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

We can remove these two. We already know that the system type is OpenNMS

we can replace these with

string instance_id = 1;
string instance_name = 2;

Use RuntimeInfo.getSystemId() to get instance id - It has to be UUID
Use SystemInfoUtils.getInstanceId() to get instance name. - This is by default OpenNMS but user can update this to be a different name when dealing with multiple OpenNMS systems

@naeem-afzal naeem-afzal changed the title NMS-16994: Add proto for NMS Inventory and Alarms NMS-16994: Export NMS Inventory and Alarms Jan 29, 2025
@naeem-afzal naeem-afzal requested a review from cgorantla January 29, 2025 15:38
@naeem-afzal naeem-afzal marked this pull request as ready for review January 30, 2025 08:40
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