{"action":"created","comment":{"url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/comments/205482859","pull_request_review_id":140759534,"id":205482859,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTQ4Mjg1OQ==","diff_hunk":"@@ -0,0 +1,168 @@\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-ArubaSWLLDPRemote {\n+\n+    <#\n+        .SYNOPSIS\n+        Get LLDP information about remote devices connected to the switch you are log on\n+\n+        .DESCRIPTION\n+        Get lldp informations about the remote devices\n+\n+        .EXAMPLE\n+        Get-ArubaSWLLDPRemote\n+        This function give you all the informations about the remote devices connected to the ports of the switch you are log on \n+    #>\n+\n+    Begin {\n+    }\n+\n+    Process {\n+\n+        $url = \"rest/v4/lldp/remote-device\"\n+\n+        $response = invoke-ArubaSWWebRequest -method \"GET\" -url $url\n+\n+        $run = ($response | convertfrom-json).lldp_remote_device_element\n+\n+        $lldp = [pscustomobject]@{\n+        LocalPort  = $run.local_port \n+        RemotePort = $run.port_id \n+        SystemName = $run.system_name\n+        PortDescription = $run.port_description\n+        }\n+\n+        $lldp\n+    }\n+\n+    End {\n+    }\n+}\n+\n+function Get-ArubaSWLLDPStatus {\n+\n+    <#\n+        .SYNOPSIS\n+        Get information about LLDP global staus\n+\n+        .DESCRIPTION\n+        Get lldp informations \n+\n+        .EXAMPLE\n+        Get-ArubaSWLLDPStatus\n+        This function give you all the informations about the global status of LLDP \n+    #>\n+\n+    Begin {\n+    }\n+\n+    Process {\n+\n+        $url = \"rest/v4/lldp\"\n+\n+        $response = invoke-ArubaSWWebRequest -method \"GET\" -url $url\n+\n+        $run = $response | convertfrom-json\n+        \n+        if ($run.admin_status = \"LLAS_ENABLED\")\n+        {\n+            $run.admin_status = \"Enable\"\n+        }\n+        else\n+        {\n+            $run.admin_status = \"Disable\"\n+        }\n+\n+        $status = [pscustomobject]@{\n+        Status  = $run.admin_status\n+        TransmitInterval = $run.transmit_interval\n+        HoldTimeMultiplier = $run.hold_time_multiplier\n+        FastStartCount = $run.fast_start_count\n+        ReinitInterval = $run.reinit_interval\n+        NotificationInterval = $run.notification_interval\n+        }\n+        \n+        $status\n+    }\n+\n+    End {\n+    }\n+}\n+\n+function Set-ArubaSWLLDPStatus {\n+\n+    <#\n+        .SYNOPSIS\n+        Set global configuration about LLDP\n+\n+        .DESCRIPTION\n+        Set lldp global parameters \n+\n+        .EXAMPLE\n+        Set-ArubaSWLLDPStatus [-transmit <5-32768>] [-holdtime <2-10>] [-faststart <1-10>]\n+        This function set the global parameters of LLDP : -enable set the LLDP active or not, -transmit set the value of transmit interval, \n+        -holdtime set the value of the hold time multiplier, and -faststart set the value of the LLDP fast start count. \n+    #>\n+\n+    Param(\n+    [Parameter (Mandatory=$false)]\n+    [ValidateRange (5,32768)]\n+    [int]$transmit,\n+    [Parameter (Mandatory=$false)]\n+    [ValidateRange (2,10)]\n+    [int]$holdtime,\n+    [Parameter (Mandatory=$false)]\n+    [ValidateRange (1,10)]\n+    [int]$faststart","path":"PowerArubaSW/Public/LLDP.ps1","position":121,"original_position":121,"commit_id":"8b49868e4dbe7d0e5725274222a82abeb7afe6b6","original_commit_id":"8b49868e4dbe7d0e5725274222a82abeb7afe6b6","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":"missing -enable option ?","created_at":"2018-07-26T14:39:02Z","updated_at":"2018-07-26T14:39:02Z","html_url":"https://github.com/alagoutte/PowerArubaSW/pull/13#discussion_r205482859","pull_request_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/13","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/comments/205482859"},"html":{"href":"https://github.com/alagoutte/PowerArubaSW/pull/13#discussion_r205482859"},"pull_request":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/13"}}},"pull_request":{"url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/13","id":203969091,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzOTY5MDkx","html_url":"https://github.com/alagoutte/PowerArubaSW/pull/13","diff_url":"https://github.com/alagoutte/PowerArubaSW/pull/13.diff","patch_url":"https://github.com/alagoutte/PowerArubaSW/pull/13.patch","issue_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/issues/13","number":13,"state":"open","locked":false,"title":"Add function LLDP","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:17Z","updated_at":"2018-07-26T14:39:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d802069ee92ded2527d66a55f8b743ee39266e0c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/13/commits","review_comments_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/13/comments","review_comment_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/issues/13/comments","statuses_url":"https://api.github.com/repos/alagoutte/PowerArubaSW/statuses/8b49868e4dbe7d0e5725274222a82abeb7afe6b6","head":{"label":"CedricMoreau:LLDP_Function","ref":"LLDP_Function","sha":"8b49868e4dbe7d0e5725274222a82abeb7afe6b6","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-07-25T21:29:00Z","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":30,"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-07-12T11:56:44Z","pushed_at":"2018-07-25T21:30:36Z","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":48,"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":3,"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":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/13"},"html":{"href":"https://github.com/alagoutte/PowerArubaSW/pull/13"},"issue":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/issues/13"},"comments":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/issues/13/comments"},"review_comments":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/13/comments"},"review_comment":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/pulls/13/commits"},"statuses":{"href":"https://api.github.com/repos/alagoutte/PowerArubaSW/statuses/8b49868e4dbe7d0e5725274222a82abeb7afe6b6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alagoutte"}}