<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Issue updated 'sites' permission for Network via API in HPE Morpheus Enterprise</title>
    <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/issue-updated-sites-permission-for-network-via-api/m-p/7249612#M2786</link>
    <description>&lt;P&gt;&lt;A class="mention" href="https://community.hpe.com/u/kgawronski"&gt;@kgawronski&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;That did it!&lt;/P&gt;
&lt;P&gt;it also made things a bit easier since I could pre-stage the “sites”: &lt;SPAN class="chcklst-box fa fa-square-o fa-fw"&gt;&lt;/SPAN&gt; amd then just do a [‘sites’].extend() to add in the [{ ‘id’: site[‘id’] }] from my loop.&lt;/P&gt;
&lt;P&gt;I know the API doesn’t mention the sites: values of ‘name’ and ‘default’, but does the API accept those as well?&lt;/P&gt;
&lt;P&gt;The reason I’m asking is I could avoid my loop and just add the ‘sites’ section from my JSON call for the old network information and update the new JSON I’m sending back for the new network via the .extend()&lt;BR /&gt;
I guess I can try and see what happens&lt;/P&gt;</description>
    <pubDate>Tue, 10 Sep 2024 14:03:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2024-09-10T14:03:39Z</dc:date>
    <item>
      <title>Issue updated 'sites' permission for Network via API</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/issue-updated-sites-permission-for-network-via-api/m-p/7249610#M2784</link>
      <description>&lt;P&gt;I’m hitting an issue updating a network via API. All the JSON fields seem to work and update correctly except for the “sites” setting, where the UI doesn’t show the group that should have access is checked to have access.&lt;/P&gt;
&lt;P&gt;The API docs show the format of the JSON payload as:&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;payload = { "network": {
        "visibility": "private",
        "resourcePermissions": {
            "all": False,
            "sites": [2]
        },
        "cidr": "127.0.0.0/24",
        "gateway": "127.0.0.1",
        "dnsPrimary": "8.8.8.8",
        "dnsSecondary": "8.8.4.4,
        "vlanId": 9,
        "pool": 15886,
        "allowStaticOverride": False,
        "active": True,
        "dhcpServer": False,
        "applianceUrlProxyBypass": True,
        "tenants": [{ "id": 1 }]
    } }
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What I’m sending is:&lt;/P&gt;
&lt;PRE style="background : #f0f1f2;"&gt;&lt;CODE class="lang-auto"&gt;{ 'network': {
  'visibility': 'private', 
  'tenants': [{'id': 1}], 
  'resourcePermissions': {
    'all': False, 
    'sites': [2]
  }, 
  'pool': 15886, 
  'displayName': None, 
  'cidr': '172.0.0.0/24', 
  'gateway': '172.0.0.1', 
  'dnsPrimary': '8.8.8.8', 
  'dnsSecondary': '8.8.4.4', 
  'vlanId': 9, 
  'allowStatisOverride': False, 
  'active': True, 
  'dhcpServer': False, 
  'searchDomains': None, 
  'applianceUrlProxyBypass': True
 }
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I’m not sure what I’m missing on why the actual group access isn’t adjusting. The “ALL” goes depending on if I set that True or False, but even leaving that out the Sites values don’t get updated.&lt;/P&gt;
&lt;P&gt;Can you tell me what I’m missing/doing wrong? I’m hoping to have this ready by this afternoon to migrate some things, duplicating permissions and settings from existing networks, but this group part is being a pain.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 13:02:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/issue-updated-sites-permission-for-network-via-api/m-p/7249610#M2784</guid>
      <dc:creator />
      <dc:date>2024-09-10T13:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Issue updated 'sites' permission for Network via API</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/issue-updated-sites-permission-for-network-via-api/m-p/7249611#M2785</link>
      <description>&lt;P&gt;Perfect! tl;dr we’re setting up more vSphere clusters which will have “networks” (portgroups) that need configured in Morpheus, and my plan is to read in one of the existing configured network values and then basically spit back to the API targeting the new matching port group to make it a super simple “copy/paste” type function. Knowing the default works in there too makes it that much easier as I can just return the full existing sites value instead of looping over to pull out only any ID values.&lt;/P&gt;
&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 14:27:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/issue-updated-sites-permission-for-network-via-api/m-p/7249611#M2785</guid>
      <dc:creator />
      <dc:date>2024-09-10T14:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Issue updated 'sites' permission for Network via API</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/issue-updated-sites-permission-for-network-via-api/m-p/7249612#M2786</link>
      <description>&lt;P&gt;&lt;A class="mention" href="https://community.hpe.com/u/kgawronski"&gt;@kgawronski&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;That did it!&lt;/P&gt;
&lt;P&gt;it also made things a bit easier since I could pre-stage the “sites”: &lt;SPAN class="chcklst-box fa fa-square-o fa-fw"&gt;&lt;/SPAN&gt; amd then just do a [‘sites’].extend() to add in the [{ ‘id’: site[‘id’] }] from my loop.&lt;/P&gt;
&lt;P&gt;I know the API doesn’t mention the sites: values of ‘name’ and ‘default’, but does the API accept those as well?&lt;/P&gt;
&lt;P&gt;The reason I’m asking is I could avoid my loop and just add the ‘sites’ section from my JSON call for the old network information and update the new JSON I’m sending back for the new network via the .extend()&lt;BR /&gt;
I guess I can try and see what happens&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 14:03:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/issue-updated-sites-permission-for-network-via-api/m-p/7249612#M2786</guid>
      <dc:creator />
      <dc:date>2024-09-10T14:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Issue updated 'sites' permission for Network via API</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/issue-updated-sites-permission-for-network-via-api/m-p/7249613#M2787</link>
      <description>&lt;P&gt;Glad to hear it worked!&lt;/P&gt;
&lt;P&gt;You can supply &lt;CODE style="background : #f0f1f2;"&gt;name&lt;/CODE&gt;, it won’t have any functionality but it won’t throw an error.  The ID is the reference that would matter.&lt;/P&gt;
&lt;P&gt;As for the default, I used the following to set the default (includes name example too):&lt;/P&gt;
&lt;PRE data-code-wrap="json"&gt;&lt;CODE class="lang-json"&gt;{
    "network": {
        "resourcePermissions": {
            "sites": [
                {
                    "id": 15,
                    "name": "testname",
                    "default": false
                },
                {
                    "id": 4,
                    "default": true
                }
            ],
            "all": false
        }
    }
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149773i0D46FC3E6B754831/image-size/large?v=v2&amp;amp;px=2000" role="button" title="29bf6c8a5ea0e0e700861b2b9da6758af99398b4.png" alt="29bf6c8a5ea0e0e700861b2b9da6758af99398b4.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I’ve added the &lt;CODE style="background : #f0f1f2;"&gt;default&lt;/CODE&gt; property to the 7.0.6 documentation as well.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 14:24:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/issue-updated-sites-permission-for-network-via-api/m-p/7249613#M2787</guid>
      <dc:creator>KoreyG</dc:creator>
      <dc:date>2024-09-10T14:24:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issue updated 'sites' permission for Network via API</title>
      <link>https://community.hpe.com/t5/hpe-morpheus-enterprise/issue-updated-sites-permission-for-network-via-api/m-p/7249614#M2788</link>
      <description>&lt;P&gt;Hello &lt;A class="mention" href="https://community.hpe.com/u/rjr162"&gt;@rjr162&lt;/A&gt;!&lt;/P&gt;
&lt;P&gt;I think the documentation may need to be updated.  Here is what I am using to set them:&lt;/P&gt;
&lt;PRE data-code-wrap="json"&gt;&lt;CODE class="lang-json"&gt;{
     "network": {
        "resourcePermissions": {
            "sites": [
                {
                    "id": 15
                },
                {
                    "id": 4
                }
            ],
            "all": false
        }
     }
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Obviously, you can send the above with other changes you are submitting.  When using the above, I get the following:&lt;BR /&gt;
&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://community.hpe.com/t5/image/serverpage/image-id/149877i8C723D50BEFAF994/image-size/large?v=v2&amp;amp;px=2000" role="button" title="7dabca8f51e67a30392ddd7d6ec05a752a11cbd7.png" alt="7dabca8f51e67a30392ddd7d6ec05a752a11cbd7.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I figured this out by using a &lt;CODE style="background : #f0f1f2;"&gt;GET&lt;/CODE&gt; on a network that I had modified and inspecting it.&lt;/P&gt;
&lt;P&gt;I’ve also changed the documentation, which should appear in the 7.0.6 version, once released.&lt;/P&gt;
&lt;P&gt;I hope that helps!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Sep 2024 13:16:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/hpe-morpheus-enterprise/issue-updated-sites-permission-for-network-via-api/m-p/7249614#M2788</guid>
      <dc:creator>KoreyG</dc:creator>
      <dc:date>2024-09-10T13:16:12Z</dc:date>
    </item>
  </channel>
</rss>

