Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
Aruba-Master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Aruba-Master
Commits
9f2eb743
Commit
9f2eb743
authored
Apr 17, 2020
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
47ab20de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
aruba.js
aruba.js
+9
-10
No files found.
aruba.js
View file @
9f2eb743
...
...
@@ -105,11 +105,12 @@ async function getAllIps() {
let
url
=
generateUrl
(
foundDc
,
'
GetPurchasedIpAddresses
'
)
let
d
=
await
doRequest
(
url
,
auth
)
masterIp
=
await
getIp
()
let
arr
=
[]
d
=
d
.
Value
for
(
let
i
=
0
;
i
<
d
.
length
;
i
++
)
{
arr
.
push
(
d
[
i
])
if
(
d
[
i
].
Value
!==
masterIp
)
arr
.
push
(
d
[
i
])
}
return
arr
...
...
@@ -117,7 +118,7 @@ async function getAllIps() {
async
function
deleteAllIps
()
{
masterIp
=
await
getIp
()
masterIp
=
await
getIp
()
let
ips
=
await
getAllIps
(
foundDc
)
for
(
let
i
=
0
;
i
<
ips
.
length
;
i
++
)
{
if
(
ips
[
i
].
Value
!==
masterIp
)
{
...
...
@@ -132,7 +133,7 @@ async function deleteAllIps() {
}
async
function
attachedToServer
(
resourceId
)
{
async
function
attachedToServer
(
resourceId
)
{
let
url
=
generateUrl
(
foundDc
,
'
SetEnqueueAssociateIpAddress
'
)
let
body
=
auth
...
...
@@ -145,7 +146,7 @@ async function attachedToServer( resourceId) {
}
async
function
unAttachedToServer
(
resourceId
)
{
async
function
unAttachedToServer
(
resourceId
)
{
let
url
=
generateUrl
(
foundDc
,
'
SetEnqueueDeassociateIpAddress
'
)
let
body
=
auth
...
...
@@ -158,7 +159,7 @@ async function unAttachedToServer( resourceId) {
}
async
function
attachedToServerByIp
(
ip
)
{
async
function
attachedToServerByIp
(
ip
)
{
let
ips
=
await
getAllIps
(
foundDc
)
for
(
let
i
=
0
;
i
<
ips
.
length
;
i
++
)
{
...
...
@@ -175,9 +176,9 @@ async function attachedToServerByIp( ip) {
}
async
function
RemovedByIp
(
ip
)
{
async
function
RemovedByIp
(
ip
)
{
let
ips
=
await
getAllIps
(
foundDc
)
masterIp
=
await
getIp
()
masterIp
=
await
getIp
()
for
(
let
i
=
0
;
i
<
ips
.
length
;
i
++
)
{
if
(
ips
[
i
].
Value
===
ip
&&
ip
!==
masterIp
)
{
await
deleteIp
(
foundDc
,
ips
[
i
].
ResourceId
)
...
...
@@ -203,8 +204,6 @@ async function deleteIp(id) {
}
async
function
doRequest
(
url
,
body
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment