{"action":"created","comment":{"url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/comments/209050327","pull_request_review_id":144990071,"id":209050327,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTA1MDMyNw==","diff_hunk":"@@ -0,0 +1,160 @@\n+#\n+# Copyright 2018, Alexis La Goutte <alexis.lagoutte at gmail dot com>\n+# Copyright 2018, C�dric Moreau <moreaucedric0 at gmail dot com>\n+#\n+# SPDX-License-Identifier: Apache-2.0\n+#\n+\n+function Get-ArubaSWTrunk {\n+\n+    <#\n+        .SYNOPSIS\n+        Get Trunk information about the ports in a trunk configuration on ArubaOS Switch.\n+\n+        .DESCRIPTION\n+        Get the list of all ports in a trunk configuration.\n+\n+        .EXAMPLE\n+        Get-ArubaSWTrunk\n+        This function give you the list of ports in a trunk configuration with the link aggregation interface and the name of ports in this interface.\n+    #>\n+\n+    Begin {\n+    }\n+\n+    Process {\n+\n+        $url = \"rest/v4/trunk/port\"\n+\n+        $response = invoke-ArubaSWWebRequest -method \"GET\" -url $url\n+\n+        $run = ($response | convertfrom-json).trunk_element\n+\n+        $run\n+\n+    }\n+\n+    End {\n+    }\n+}\n+\n+function Add-ArubaSWTrunk {\n+\n+    <#\n+        .SYNOPSIS\n+        Add ports into a trunk configuration on ArubaOS Switch.\n+\n+        .DESCRIPTION\n+        Add ports in a trunk group.\n+\n+        .EXAMPLE\n+        Add-ArubaSWTrunk trk5 4\n+        Add port 4 in trunk group trk5\n+\n+        .EXAMPLE\n+        Add-ArubaSWTrunk -trunk_group trk4 -port 6\n+        Add port 6 in trunk group trk4.\n+\n+        .EXAMPLE\n+        Add-ArubaSWTrunk -trunk_group trk6 -port 3\n+        PS C:>Add-ArubaSWTrunk -trunk_group trk6 -port 5\n+        If you want to configure ports 3 and 5 in trunk group 6.\n+    #>\n+\n+    Param(\n+        [Parameter (Mandatory=$true, Position=1)]\n+        [string]$trunk_group,\n+        [Parameter (Mandatory=$true, Position=2)]\n+        [string]$port\n+    \n+    )\n+\n+    Begin {\n+    }\n+\n+    Process {\n+\n+        $url = \"rest/v4/trunk/port\"\n+\n+        $trunk = new-Object -TypeName PSObject\n+\n+        $trunk | add-member -name \"port_id\" -membertype NoteProperty -Value $port\n+\n+        $trunk | add-member -name \"trunk_group\" -membertype NoteProperty -Value $interface\n+\n+        $response = invoke-ArubaSWWebRequest -method \"POST\" -body $trunk -url $url\n+\n+        $run = $response | convertfrom-json\n+\n+        $run\n+\n+    }\n+\n+    End {\n+    }\n+}\n+\n+function Remove-ArubaSWTrunk {\n+\n+    <#\n+        .SYNOPSIS\n+        Remove a port from a trunk group on ArubaOS Switch\n+\n+        .DESCRIPTION\n+        Remove port of the trunk group\n+\n+        .EXAMPLE\n+        Remove-ArubaSWTrunk -trunk_group trk4 -port 5 \n+        Remove port 5 of the trunk group trk4.\n+\n+        .EXAMPLE\n+        ","path":"PowerArubaSW/Public/Trunk.ps1","position":111,"original_position":111,"commit_id":"b76058c7d026c9e93918e185def8bc328cc2a25f","original_commit_id":"b76058c7d026c9e93918e185def8bc328cc2a25f","user":{"login":"alagoutte","id":1098542,"node_id":"MDQ6VXNlcjEwOTg1NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/1098542?v=4","gravatar_id":"","url":"https://api.github.com/users/alagoutte","html_url":"https://github.com/alagoutte","followers_url":"https://api.github.com/users/alagoutte/followers","following_url":"https://api.github.com/users/alagoutte/following{/other_user}","gists_url":"https://api.github.com/users/alagoutte/gists{/gist_id}","starred_url":"https://api.github.com/users/alagoutte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alagoutte/subscriptions","organizations_url":"https://api.github.com/users/alagoutte/orgs","repos_url":"https://api.github.com/users/alagoutte/repos","events_url":"https://api.github.com/users/alagoutte/events{/privacy}","received_events_url":"https://api.github.com/users/alagoutte/received_events","type":"User","site_admin":false},"body":"Remove blank line","created_at":"2018-08-09T19:24:53Z","updated_at":"2018-08-09T19:24:53Z","html_url":"https://github.com/alagoutte/PowerArubaSW/pull/14#discussion_r209050327","pull_request_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/14","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/comments/209050327"},"html":{"href":"https://github.com/alagoutte/PowerArubaSW/pull/14#discussion_r209050327"},"pull_request":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/14","id":203969177,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzOTY5MTc3","html_url":"https://github.com/alagoutte/PowerArubaSW/pull/14","diff_url":"https://github.com/alagoutte/PowerArubaSW/pull/14.diff","patch_url":"https://github.com/alagoutte/PowerArubaSW/pull/14.patch","issue_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/issues/14","number":14,"state":"open","locked":false,"title":"Add function Trunk","user":{"login":"CedricMoreau","id":40433177,"node_id":"MDQ6VXNlcjQwNDMzMTc3","avatar_url":"https://avatars3.githubusercontent.com/u/40433177?v=4","gravatar_id":"","url":"https://api.github.com/users/CedricMoreau","html_url":"https://github.com/CedricMoreau","followers_url":"https://api.github.com/users/CedricMoreau/followers","following_url":"https://api.github.com/users/CedricMoreau/following{/other_user}","gists_url":"https://api.github.com/users/CedricMoreau/gists{/gist_id}","starred_url":"https://api.github.com/users/CedricMoreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CedricMoreau/subscriptions","organizations_url":"https://api.github.com/users/CedricMoreau/orgs","repos_url":"https://api.github.com/users/CedricMoreau/repos","events_url":"https://api.github.com/users/CedricMoreau/events{/privacy}","received_events_url":"https://api.github.com/users/CedricMoreau/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-25T21:30:35Z","updated_at":"2018-08-09T19:24:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05b9f9c22d103ff81ed3fe82501ba58cd1573259","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/14/commits","review_comments_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/14/comments","review_comment_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/issues/14/comments","statuses_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/statuses/b76058c7d026c9e93918e185def8bc328cc2a25f","head":{"label":"CedricMoreau:Trunk_Function","ref":"Trunk_Function","sha":"b76058c7d026c9e93918e185def8bc328cc2a25f","user":{"login":"CedricMoreau","id":40433177,"node_id":"MDQ6VXNlcjQwNDMzMTc3","avatar_url":"https://avatars3.githubusercontent.com/u/40433177?v=4","gravatar_id":"","url":"https://api.github.com/users/CedricMoreau","html_url":"https://github.com/CedricMoreau","followers_url":"https://api.github.com/users/CedricMoreau/followers","following_url":"https://api.github.com/users/CedricMoreau/following{/other_user}","gists_url":"https://api.github.com/users/CedricMoreau/gists{/gist_id}","starred_url":"https://api.github.com/users/CedricMoreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CedricMoreau/subscriptions","organizations_url":"https://api.github.com/users/CedricMoreau/orgs","repos_url":"https://api.github.com/users/CedricMoreau/repos","events_url":"https://api.github.com/users/CedricMoreau/events{/privacy}","received_events_url":"https://api.github.com/users/CedricMoreau/received_events","type":"User","site_admin":false},"repo":{"id":138561275,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg1NjEyNzU=","name":"PowerArubaSW","full_name":"CedricMoreau/PowerArubaSW","owner":{"login":"CedricMoreau","id":40433177,"node_id":"MDQ6VXNlcjQwNDMzMTc3","avatar_url":"https://avatars3.githubusercontent.com/u/40433177?v=4","gravatar_id":"","url":"https://api.github.com/users/CedricMoreau","html_url":"https://github.com/CedricMoreau","followers_url":"https://api.github.com/users/CedricMoreau/followers","following_url":"https://api.github.com/users/CedricMoreau/following{/other_user}","gists_url":"https://api.github.com/users/CedricMoreau/gists{/gist_id}","starred_url":"https://api.github.com/users/CedricMoreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CedricMoreau/subscriptions","organizations_url":"https://api.github.com/users/CedricMoreau/orgs","repos_url":"https://api.github.com/users/CedricMoreau/repos","events_url":"https://api.github.com/users/CedricMoreau/events{/privacy}","received_events_url":"https://api.github.com/users/CedricMoreau/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CedricMoreau/PowerArubaSW","description":"Powershell cmdlets for managed ArubaOS switches","fork":true,"url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW","forks_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/forks","keys_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/teams","hooks_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/hooks","issue_events_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/issues/events{/number}","events_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/events","assignees_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/assignees{/user}","branches_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/branches{/branch}","tags_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/tags","blobs_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/git/refs{/sha}","trees_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/statuses/{sha}","languages_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/languages","stargazers_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/stargazers","contributors_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/contributors","subscribers_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/subscribers","subscription_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/subscription","commits_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/commits{/sha}","git_commits_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/git/commits{/sha}","comments_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/comments{/number}","issue_comment_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/issues/comments{/number}","contents_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/contents/{+path}","compare_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/merges","archive_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/downloads","issues_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/issues{/number}","pulls_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/pulls{/number}","milestones_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/milestones{/number}","notifications_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/labels{/name}","releases_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/releases{/id}","deployments_url":"https://api.github.com/repos/CedricMoreau/PowerArubaSW/deployments","created_at":"2018-06-25T07:51:44Z","updated_at":"2018-06-25T07:51:46Z","pushed_at":"2018-08-08T10:26:11Z","git_url":"git://github.com/CedricMoreau/PowerArubaSW.git","ssh_url":"git@github.com:CedricMoreau/PowerArubaSW.git","clone_url":"https://github.com/CedricMoreau/PowerArubaSW.git","svn_url":"https://github.com/CedricMoreau/PowerArubaSW","homepage":"","size":48,"stargazers_count":0,"watchers_count":0,"language":"PowerShell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"alagoutte:master","ref":"master","sha":"eb91b9b8b19787206ca7a5e2dc04b535441725e9","user":{"login":"alagoutte","id":1098542,"node_id":"MDQ6VXNlcjEwOTg1NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/1098542?v=4","gravatar_id":"","url":"https://api.github.com/users/alagoutte","html_url":"https://github.com/alagoutte","followers_url":"https://api.github.com/users/alagoutte/followers","following_url":"https://api.github.com/users/alagoutte/following{/other_user}","gists_url":"https://api.github.com/users/alagoutte/gists{/gist_id}","starred_url":"https://api.github.com/users/alagoutte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alagoutte/subscriptions","organizations_url":"https://api.github.com/users/alagoutte/orgs","repos_url":"https://api.github.com/users/alagoutte/repos","events_url":"https://api.github.com/users/alagoutte/events{/privacy}","received_events_url":"https://api.github.com/users/alagoutte/received_events","type":"User","site_admin":false},"repo":{"id":135551846,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU1NTE4NDY=","name":"PowerArubaSW","full_name":"alagoutte/PowerArubaSW","owner":{"login":"alagoutte","id":1098542,"node_id":"MDQ6VXNlcjEwOTg1NDI=","avatar_url":"https://avatars0.githubusercontent.com/u/1098542?v=4","gravatar_id":"","url":"https://api.github.com/users/alagoutte","html_url":"https://github.com/alagoutte","followers_url":"https://api.github.com/users/alagoutte/followers","following_url":"https://api.github.com/users/alagoutte/following{/other_user}","gists_url":"https://api.github.com/users/alagoutte/gists{/gist_id}","starred_url":"https://api.github.com/users/alagoutte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alagoutte/subscriptions","organizations_url":"https://api.github.com/users/alagoutte/orgs","repos_url":"https://api.github.com/users/alagoutte/repos","events_url":"https://api.github.com/users/alagoutte/events{/privacy}","received_events_url":"https://api.github.com/users/alagoutte/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alagoutte/PowerArubaSW","description":"Powershell cmdlets for managed ArubaOS switches","fork":false,"url":"https://api.github.com/repos/alagoutte/PowerArubaSW","forks_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/forks","keys_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/teams","hooks_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/hooks","issue_events_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/issues/events{/number}","events_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/events","assignees_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/assignees{/user}","branches_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/branches{/branch}","tags_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/tags","blobs_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/git/refs{/sha}","trees_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/statuses/{sha}","languages_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/languages","stargazers_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/stargazers","contributors_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/contributors","subscribers_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/subscribers","subscription_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/subscription","commits_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/commits{/sha}","git_commits_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/git/commits{/sha}","comments_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/comments{/number}","issue_comment_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/issues/comments{/number}","contents_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/contents/{+path}","compare_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/merges","archive_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/downloads","issues_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/issues{/number}","pulls_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls{/number}","milestones_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/milestones{/number}","notifications_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/labels{/name}","releases_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/releases{/id}","deployments_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/deployments","created_at":"2018-05-31T07:59:00Z","updated_at":"2018-08-05T10:14:33Z","pushed_at":"2018-08-08T10:26:35Z","git_url":"git://github.com/alagoutte/PowerArubaSW.git","ssh_url":"git@github.com:alagoutte/PowerArubaSW.git","clone_url":"https://github.com/alagoutte/PowerArubaSW.git","svn_url":"https://github.com/alagoutte/PowerArubaSW","homepage":"","size":51,"stargazers_count":3,"watchers_count":3,"language":"PowerShell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":6,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/14"},"html":{"href":"https://github.com/alagoutte/PowerArubaSW/pull/14"},"issue":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/issues/14"},"comments":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/statuses/b76058c7d026c9e93918e185def8bc328cc2a25f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alagoutte"}}