Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zimbra-admin-api-js
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Public
zimbra-admin-api-js
Commits
f1877ae0
Commit
f1877ae0
authored
May 05, 2017
by
Patricio Bruna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Tests and Vagrant
parent
eca277a0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
30 deletions
+32
-30
test.js
test/test.js
+26
-29
ipaddress.pyc
vagrant/provision/filter_plugins/ipaddress.pyc
+0
-0
playbook.yml
vagrant/provision/playbook.yml
+4
-0
main.yml
vagrant/provision/roles/bertvv.bind/tasks/main.yml
+1
-1
zimbra_configuration.conf.j2
...s/pbruna.zimbradev/templates/zimbra_configuration.conf.j2
+1
-0
No files found.
test/test.js
View file @
f1877ae0
...
@@ -18,7 +18,8 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
...
@@ -18,7 +18,8 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
var
auth_data
=
{
var
auth_data
=
{
'url'
:
zimbraURL
,
'url'
:
zimbraURL
,
'user'
:
zimbraAdminUser
,
'user'
:
zimbraAdminUser
,
'password'
:
zimbraAdminPassword
'password'
:
zimbraAdminPassword
,
'isAdmin'
:
true
};
};
describe
(
'Basic tests'
,
function
()
{
describe
(
'Basic tests'
,
function
()
{
...
@@ -376,7 +377,6 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
...
@@ -376,7 +377,6 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
let
api
=
new
ZimbraAdminApi
(
auth_data
);
let
api
=
new
ZimbraAdminApi
(
auth_data
);
api
.
getAccountMembership
(
account
,
function
(
err
,
data
){
api
.
getAccountMembership
(
account
,
function
(
err
,
data
){
if
(
err
)
return
console
.
log
(
err
);
if
(
err
)
return
console
.
log
(
err
);
console
.
log
(
data
);
expect
(
data
.
length
).
to
.
be
.
equal
(
0
);
expect
(
data
.
length
).
to
.
be
.
equal
(
0
);
done
();
done
();
});
});
...
@@ -829,71 +829,70 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
...
@@ -829,71 +829,70 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
});
});
describe
(
'COS tests'
,
function
()
{
describe
(
'COS tests'
,
function
()
{
this
.
timeout
(
5000
);
this
.
timeout
(
5000
);
let
cos_name
=
Date
.
now
().
toString
();
let
cos_id
;
it
(
'Should create a COS'
,
function
(
done
){
it
(
'Should create a COS'
,
function
(
done
){
let
api
=
new
ZimbraAdminApi
(
auth_data
);
let
api
=
new
ZimbraAdminApi
(
auth_data
);
let
cos_name
=
Date
.
now
();
let
attrs
=
{
'zimbraFeatureContactsEnabled'
:
'FALSE'
};
let
attrs
=
{
'zimbraFeatureContactsEnabled'
:
'FALSE'
};
api
.
createCos
(
cos_name
,
attrs
,
function
(
err
,
cos
){
api
.
createCos
(
cos_name
,
attrs
,
function
(
err
,
cos
){
if
(
err
)
return
console
.
error
(
err
);
if
(
err
)
return
console
.
error
(
err
);
expect
(
err
).
to
.
be
.
null
;
expect
(
err
).
to
.
be
.
null
;
cos_id
=
cos
.
id
;
done
();
done
();
});
});
})
})
it
(
'Should delete COS "unknow" '
,
function
(
done
){
it
(
'Should modify a Cos'
,
function
(
done
){
let
api
=
new
ZimbraAdminApi
(
auth_data
);
api
.
getCos
(
"unknow"
,
function
(
err
,
cos
){
if
(
err
)
return
console
.
error
(
err
);
let
cosId
=
cos
.
id
;
console
.
log
(
cosId
);
api
.
deleteCos
(
cosId
,
function
(
err
,
res
){
if
(
err
)
return
console
.
error
(
err
);
console
.
log
(
res
);
expect
(
err
).
to
.
be
.
null
;
done
();
})
});
})
it
(
'Should modify a Cos "basic"'
,
function
(
done
){
let
api
=
new
ZimbraAdminApi
(
auth_data
);
let
api
=
new
ZimbraAdminApi
(
auth_data
);
let
attrs
=
{
'zimbraDumpsterEnabled'
:
'TRUE'
};
let
attrs
=
{
'zimbraDumpsterEnabled'
:
'TRUE'
};
api
.
getCos
(
"basic"
,
function
(
err
,
cos
){
api
.
getCos
(
cos_name
,
function
(
err
,
cos
){
if
(
err
)
return
console
.
error
(
err
);
if
(
err
)
return
console
.
error
(
err
);
api
.
modifyCos
(
cos
.
id
,
attrs
,
function
(
err
,
res
){
api
.
modifyCos
(
cos
.
id
,
attrs
,
function
(
err
,
res
){
if
(
err
)
return
console
.
error
(
err
);
if
(
err
)
return
console
.
error
(
err
);
console
.
log
(
res
);
expect
(
err
).
to
.
be
.
null
;
expect
(
err
).
to
.
be
.
null
;
done
();
done
();
});
});
});
});
});
});
it
(
'Should rename Cos "Basic"
'
,
function
(
done
){
it
.
skip
(
'Should rename Cos
'
,
function
(
done
){
let
api
=
new
ZimbraAdminApi
(
auth_data
);
let
api
=
new
ZimbraAdminApi
(
auth_data
);
let
newName
=
"basicv2"
let
newName
=
Date
.
now
().
toString
();
api
.
getCos
(
"basic"
,
function
(
err
,
cos
){
api
.
getCos
(
cos_name
,
function
(
err
,
cos
){
if
(
err
)
return
console
.
error
(
err
);
if
(
err
)
return
console
.
error
(
err
);
api
.
renameCos
(
cos
.
id
,
newName
,
function
(
err
,
res
){
api
.
renameCos
(
cos
.
id
,
newName
,
function
(
err
,
res
){
if
(
err
)
return
console
.
log
(
err
);
if
(
err
)
return
console
.
log
(
err
);
console
.
log
(
res
);
expect
(
err
).
to
.
be
.
null
;
expect
(
err
).
to
.
be
.
null
;
done
();
done
();
});
});
});
});
});
});
it
(
'Should create a copy of Cos Professional
'
,
function
(
done
){
it
.
skip
(
'Should create a copy of Cos
'
,
function
(
done
){
let
api
=
new
ZimbraAdminApi
(
auth_data
);
let
api
=
new
ZimbraAdminApi
(
auth_data
);
let
newCos
=
Date
.
now
();
let
newCos
=
Date
.
now
();
api
.
copyCos
(
"professional"
,
newCos
,
function
(
err
,
res
){
api
.
copyCos
(
cos_name
,
newCos
,
function
(
err
,
res
){
if
(
err
)
return
console
.
error
(
err
);
if
(
err
)
return
console
.
error
(
err
);
expect
(
err
).
to
.
be
.
null
;
expect
(
err
).
to
.
be
.
null
;
done
();
done
();
})
})
});
});
it
(
'Should delete COS'
,
function
(
done
){
let
api
=
new
ZimbraAdminApi
(
auth_data
);
api
.
getCos
(
cos_name
,
function
(
err
,
cos
){
if
(
err
)
return
console
.
error
(
err
);
let
cosId
=
cos
.
id
;
console
.
log
(
cosId
);
api
.
deleteCos
(
cosId
,
function
(
err
,
res
){
if
(
err
)
return
console
.
error
(
err
);
expect
(
err
).
to
.
be
.
null
;
done
();
})
});
})
});
});
describe
(
'DistributionList tests'
,
function
()
{
describe
(
'DistributionList tests'
,
function
()
{
...
@@ -953,7 +952,6 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
...
@@ -953,7 +952,6 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
let
dl
=
data
;
let
dl
=
data
;
api
.
addDistributionListAlias
(
dl
.
id
,
alias
,
function
(
err
,
data
){
api
.
addDistributionListAlias
(
dl
.
id
,
alias
,
function
(
err
,
data
){
if
(
err
)
return
console
.
error
(
err
);
if
(
err
)
return
console
.
error
(
err
);
console
.
log
(
data
);
expect
(
err
).
to
.
be
.
null
;
expect
(
err
).
to
.
be
.
null
;
done
();
done
();
});
});
...
@@ -969,7 +967,6 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
...
@@ -969,7 +967,6 @@ var zimbraAdminPassword = process.env.ZIMBRA_PASSWORD || '12345678';
if
(
err
)
return
console
.
error
(
err
);
if
(
err
)
return
console
.
error
(
err
);
api
.
removeDistributionListAlias
(
dl
.
id
,
alias
,
function
(
err
,
data
){
api
.
removeDistributionListAlias
(
dl
.
id
,
alias
,
function
(
err
,
data
){
if
(
err
)
return
console
.
error
(
err
);
if
(
err
)
return
console
.
error
(
err
);
console
.
log
(
data
);
expect
(
err
).
to
.
be
.
null
;
expect
(
err
).
to
.
be
.
null
;
done
();
done
();
});
});
...
...
vagrant/provision/filter_plugins/ipaddress.pyc
View file @
f1877ae0
No preview for this file type
vagrant/provision/playbook.yml
View file @
f1877ae0
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
-
name
:
'
zimbra'
-
name
:
'
zimbra'
ip
:
'
192.168.50.10'
ip
:
'
192.168.50.10'
tasks
:
-
name
:
up network card
command
:
/usr/sbin/ifconfig eth1 up
roles
:
roles
:
-
role
:
common
-
role
:
common
-
role
:
bertvv.bind
-
role
:
bertvv.bind
...
...
vagrant/provision/roles/bertvv.bind/tasks/main.yml
View file @
f1877ae0
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
yum
:
yum
:
pkg
:
"
{{
item
}}"
pkg
:
"
{{
item
}}"
state
:
installed
state
:
installed
with_items
:
bind_packages
with_items
:
"
{{bind_packages}}"
tags
:
bind
tags
:
bind
-
name
:
Create serial
-
name
:
Create serial
...
...
vagrant/provision/roles/pbruna.zimbradev/templates/zimbra_configuration.conf.j2
View file @
f1877ae0
...
@@ -16,3 +16,4 @@ EXPANDMENU="no"
...
@@ -16,3 +16,4 @@ EXPANDMENU="no"
HOSTNAME="{{ ansible_nodename }}"
HOSTNAME="{{ ansible_nodename }}"
DOTRAINSA="yes"
DOTRAINSA="yes"
ENABLEGALSYNCACCOUNTS=""
ENABLEGALSYNCACCOUNTS=""
INSTALL_PACKAGES="zimbra-core zimbra-ldap zimbra-logger zimbra-mta zimbra-snmp zimbra-store zimbra-apache zimbra-spell zimbra-convertd"
\ No newline at end of file
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