Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Tutorials
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • Integration Studio
      • System Architecture
      • DataMiner Releases & Updates
      • DataMiner Apps
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

In automation script, how to get Resource details from Device IP

Solved578 views20th June 2024#automationscript Automation DIS Automation script solution automion script
1
Baranisudha Murugesan784 14th June 2024 2 Comments

I will get a list of device IPs from postman calling a API trigger in automation script. I want to extract Resource details from the Device IP im getting. Do we have any extension methods to get?

So below are the resource details i have in hand.

  • "10.130.119.34"
  • "03ea386d-f8fd-4891-a2f4-b77491bca7aa"
  • "Demodulator"

So the expectation is to get the element details from the information i have.

Baranisudha Murugesan Selected answer as best 20th June 2024
Peter Vanpoucke [SLC] [DevOps Advocate] commented 18th June 2024

hi
Could you elaborate on how the resource is linked with the IP and what details you would need from the resource? Perhaps adding a screenshot to your question might give a hint.

Baranisudha Murugesan commented 18th June 2024

I have updated the question with extra details

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
Jorge Dias [SLC] [DevOps Enabler]4.76K Posted 18th June 2024 3 Comments

Hi Baranisudha,

Please check the reply from question Is it possible to find the element using IP address with engine.FindElements() - DataMiner Dojo.

From there you will have a string with a list of dmaId/elementId separated by ';' that you can use to find the element details.

var ids = globalElementID.Split(',');

var elements = new List<Element>();

foreach (var id in ids)

{

var aux = id.Split('/');

var dmaId = Convert.ToInt32(aux[0]);

var elementId = Convert.ToInt32(aux[1]);

var element = engine.FindElement(dmaId, elementId);

elements.Add(element);

}

From there you have a list with all elements that use the provided IP, you just need your logic to return the data that you need.

Baranisudha Murugesan Selected answer as best 20th June 2024
Baranisudha Murugesan commented 20th June 2024

i have tried this method, but i couldn’t achieve it because the Notify method is deprecated.

DMS dms = new DMS();
dms.Notify(type/*DMS_GET_ELEMENT_ID_FROM_IP*/ , subType, ipBus, null, out result);

Error message we are receiving —
Script Failure (Sky_Create_Service): (after retries) (Code: 0x80040251) Skyline.DataMiner.Net.Exceptions.DataMinerException: No Assembly found for cookie 10
(123,4): error CS0246: The type or namespace name ‘DMS’ could not be found (are you missing a using directive or an assembly reference?)

But I have referenced DMS.

Jorge Dias [SLC] [DevOps Enabler] commented 20th June 2024

Is not a problem the Notify to be deprecated.
Can you add C:Skyline DataMinerFilesInterop.SLDms.dll to DLL references of your script? Add using Interop.SLDms; in the code?

Baranisudha Murugesan commented 20th June 2024

Yes this works. Thank you!!

You are viewing 1 out of 1 answers, click here to view all answers.
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas

Recent questions

Web Applications exception in Cube due to invalid certificate 0 Answers | 0 Votes
Redundancy Groups and Alarming – Duplicate Alarms 0 Answers | 0 Votes
Correlation Engine: “Test rule” doesn’t result in a hit, despite functional rule 1 Answer | 3 Votes

Question Tags

adl2099 (115) alarm (62) Alarm Console (82) alarms (100) alarm template (83) Automation (223) automation scipt (111) Automation script (167) backup (71) Cassandra (180) Connector (109) Correlation (69) Correlation rule (52) Cube (151) Dashboard (194) Dashboards (188) database (83) DataMiner Cube (57) DIS (81) DMS (71) DOM (140) driver (65) DVE (56) Elastic (83) Elasticsearch (115) elements (80) Failover (104) GQI (159) HTTP (76) IDP (74) LCA (152) low code app (166) low code apps (93) lowcodeapps (75) MySQL (53) protocol (203) QAction (83) security (88) SNMP (86) SRM (337) table (54) trending (87) upgrade (62) Visio (539) Visual Overview (345)
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin