- Community Home
- >
- Software
- >
- HPE Morpheus Software
- >
- HPE Morpheus Enterprise Software
- >
- List all Network domains using Morpheus API
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 10:15 PM
02-22-2024 10:15 PM
We are trying to create dropdown to list all the network domain under the Infrastructure/Networks/Domains. We have got 4 domains including localdomain. We are able to list one domain but cannot list all the domains.
API Method
Translation Script:
for (var x = 0; x < data.length; x++) {
if(data[x].networkDomain['name'])
results.push({name:data[x].networkDomain['name'], value:data[x].networkDomain['id']});
}
Request Script:
results.zoneId = input.cloud
results.siteId = input.group
But this is displaying only one domain instead of 3 domain, so we are not sure if this is right approach. Please advise.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2024 09:12 AM
02-23-2024 09:12 AM
Re: List all Network domains using Morpheus API
Thank you, this one worked. But this is not getting added to the hostname. How can we bind this domain to the server during provision via catalog. Any example or suggestions plz.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2024 02:02 AM
03-01-2024 02:02 AM
Re: List all Network domains using Morpheus API
Hi Suresh,
If the VM is not domain-joined, it’s likely because the domain controller hasn’t been properly configured in the domain settings. Here’s a helpful documentation link that guides you through the process of configuring the domain controller in your domains:
https://docs.morpheusdata.com/en/latest/infrastructure/networks/domains.html#adding-domains
Thanks
Velan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2024 02:55 PM
02-24-2024 02:55 PM
Re: List all Network domains using Morpheus API
Do you mean its not being added to the domain?
If so you need to make sure to provide the domain ID in the “networkDomain” section of the catalog. (As well as make sure the Domain in Morpheus is configured correctly)
Or do you mean the hostname in Morpheus is not getting updated?
Remember the hostname of a VM and the display name is deferent. To see the hostname (not the instance or server display name) you would need to click into the server and look at “Hostname” in the “info” section.
I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 10:51 PM
02-22-2024 10:51 PM
SolutionHi Suresh,
If you’re looking to list all the network domains under Infrastructure/Networks/Domains, then the recommended approach is to utilize the REST option by using the API endpoint /api/networks/domains?max=-1. You can find more details about this endpoint in the API documentation here:
Get all Network Domains with the translation script as below
for(var x=0;x < data.networkDomains.length; x++) {
var domain = data.networkDomains[x].active
if (domain==true){ //Only show active domains
results.push({name: data.networkDomains[x].name,value:data.networkDomains[x].id});
}
}
The Morpheus API option list for networks will return the network domains attached to the networks. It seems that in your environment, a network domain has been attached to one network, which is why you’re seeing only one network domain from the Morpheus API option list.
Thanks
Velan