Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
okeanos-LoD
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
itminedu
okeanos-LoD
Commits
a6971513
Unverified
Commit
a6971513
authored
Jul 06, 2015
by
efikalti
Committed by
Avraam Tsantekidis
Jul 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LAM-41 file containing the definition of the errors used in provisioner
parent
dd070279
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
2 deletions
+55
-2
kamaki/cluster_error_constants.py
kamaki/cluster_error_constants.py
+52
-0
kamaki/provision.py
kamaki/provision.py
+3
-2
No files found.
kamaki/cluster_error_constants.py
0 → 100644
View file @
a6971513
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from
__future__
import
(
absolute_import
,
division
,
print_function
,
unicode_literals
)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This module contains the definitions of returned errors.
"""
import
os
# Definitions of return value errors
error_syntax_clustersize
=
-
1
error_syntax_cpu_master
=
-
2
error_syntax_ram_master
=
-
3
error_syntax_disk_master
=
-
4
error_syntax_cpu_slave
=
-
5
error_syntax_ram_slave
=
-
6
error_syntax_disk_slave
=
-
7
error_syntax_logging_level
=
-
8
error_syntax_disk_template
=
-
9
error_quotas_cyclades_disk
=
-
10
error_quotas_cpu
=
-
11
error_quotas_ram
=
-
12
error_quotas_cluster_size
=
-
13
error_quotas_network
=
-
14
error_flavor_id
=
-
15
error_image_id
=
-
16
error_syntax_token
=
-
17
error_ready_reroute
=
-
18
error_no_arguments
=
-
19
error_fatal
=
-
20
error_user_quota
=
-
22
error_flavor_list
=
-
23
error_get_list_servers
=
-
24
error_get_list_projects
=
-
25
error_get_network_quota
=
-
28
error_create_network
=
-
29
error_get_ip
=
-
30
error_create_server
=
-
31
error_syntax_auth_token
=
-
32
error_ansible_playbook
=
-
34
error_ssh_client
=
-
35
error_cluster_not_exist
=
-
69
error_cluster_corrupt
=
-
70
error_proj_id
=
-
71
error_multiple_entries
=
-
72
error_project_quota
=
-
73
error_authentication
=
-
99
kamaki/provision.py
View file @
a6971513
...
...
@@ -5,6 +5,7 @@ from __future__ import (absolute_import, division,
print_function
,
unicode_literals
)
import
logging
import
argparse
from
cluster_error_constants
import
*
from
kamaki.clients
import
astakos
,
cyclades
from
kamaki.clients
import
ClientError
from
kamaki.clients.utils
import
https
...
...
@@ -361,7 +362,7 @@ if __name__ == "__main__":
default
=
"lambda.grnet.gr"
)
parser
.
add_argument
(
'--name'
,
type
=
str
,
dest
=
'name'
,
default
=
"to mikro debian sto livadi"
)
parser
.
add_argument
(
'--cluster_size'
,
type
=
int
,
dest
=
'cluster_size'
,
default
=
3
)
parser
.
add_argument
(
'--cluster_size'
,
type
=
int
,
dest
=
'cluster_size'
,
default
=
100
)
parser
.
add_argument
(
'--cpu_request'
,
type
=
int
,
dest
=
'cpu_request'
,
default
=
3
)
parser
.
add_argument
(
'--ram_request'
,
type
=
int
,
dest
=
'ram_request'
,
default
=
4000
)
# in MB
parser
.
add_argument
(
'--disk_request'
,
type
=
int
,
dest
=
'disk_request'
,
default
=
400
)
# in GB
...
...
@@ -370,7 +371,7 @@ if __name__ == "__main__":
args
=
parser
.
parse_args
()
#
run p
rovisioner methods
#
Run P
rovisioner methods
provisioner
=
Provisioner
(
cloud_name
=
args
.
cloud
)
print
(
provisioner
.
check_all_resources
(
cluster_size
=
args
.
cluster_size
,
cpu_request
=
args
.
cpu_request
,
...
...
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