[PATCH] Update API.md to reflect /host/users and /host/groups API
by alinefm@linux.vnet.ibm.com
From: Aline Manera <alinefm(a)linux.vnet.ibm.com>
Commit fe2fd1db added the functionalities to list system users and
groups but forgot to update the API.md
Fix it.
Signed-off-by: Aline Manera <alinefm(a)linux.vnet.ibm.com>
---
docs/API.md | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/docs/API.md b/docs/API.md
index 4f51dd0..75b933c 100644
--- a/docs/API.md
+++ b/docs/API.md
@@ -763,6 +763,24 @@ Contains information of host.
* swupdate: Start the update of packages in background and return a Task resource
* task resource. * See Resource: Task *
+### Resource: Host users
+
+**URI:** /host/users
+List of system users in the host.
+
+**Methods:**
+
+* **GET**: Retrieve list of system users in the host.
+
+### Resource: Host groups
+
+**URI:** /host/groups
+List of system groups in the host.
+
+**Methods:**
+
+* **GET**: Retrieve list of system groups in the host.
+
### Resource: HostStats
**URI:** /host/stats
--
1.9.3
10 years, 5 months
RFC: Design of Authorization in Kimchi
by Wen Wang
Hi all,
Due to the fact that Kimchi needs authorization feature to be designed.
I an posting my point of view below of how I thought about doing it,
including how I plan doing it in the front-end and request for help for
the back end support.
Kimchi changed to a traditional login patten in last release that makes
Kimchi more secure to use. It Before login, the front-end can hardly get
any html information before user actually login. As we discussed, root
user will have full access to Kimchi whereas the non-root user will have
restricted privileges. It will be easier and more decent to show the
proper tabs to certain users that distinguished by the back-end. Now the
tabs are generated by an xml file generated from the back-end that show
all 5 tabs. We probably need to have the '*Host*' and '*template*'
tab_removed_ for non-root users, which is recommended to be done in the
back-end.
Also there need to be information provided to the front-end like the
user-name, user-role as well as user-group, etc. that indicate user
identity after login. The browser need the information to give certain
privileges to certain users and disable the unnecessary functions. My
suggestion is to have these 3 parameters passed: ***user-name,
user-role* as well as *user-group*. There is a better extendibility to
user the user-role other than isRoot so that we can define more roles in
the future. As fact that we have only defined two roles now, the
user-role parameter can be divided into root and guest based on user is
root or non-root. These message can get from *sessiondada*, *cookie *or
passed according to a query. the way passing the info of the user is
still under discussion. Request for your advises.
Best Regards
Wang Wen
10 years, 5 months
Authorization: allow root user specify users/groups to a VM
by Yu Xin Huo
I tried below:
On my linux workstation, I only created 2 users: 'root' and 'tify'.
Most of users and groups below look like system users and groups target
for quite specific purpose.
Can we do some filtering to only get users and groups that truly related
to VM assignment?
curl -k -u root:pass -H "Content-Type: applicaion/json" -H "Accept:
application/json" https://localhost:8001/host/users
[
"root",
"bin",
"daemon",
"adm",
"lp",
"sync",
"shutdown",
"halt",
"mail",
"uucp",
"operator",
"games",
"gopher",
"ftp",
"nobody",
"dbus",
"usbmuxd",
"rpc",
"vcsa",
"rtkit",
"avahi-autoipd",
"saslauth",
"postfix",
"rpcuser",
"nfsnobody",
"ntp",
"apache",
"radvd",
"haldaemon",
"qemu",
"pulse",
"gsanslcd",
"nm-openconnect",
"gdm",
"sshd",
"tcpdump",
"tify",
"nginx"
]
curl -k -u root:pass -H "Content-Type: applicaion/json" -H "Accept:
application/json" https://localhost:8001/host/groups
[
"root",
"bin",
"daemon",
"sys",
"adm",
"tty",
"disk",
"lp",
"mem",
"kmem",
"wheel",
"mail",
"uucp",
"man",
"games",
"gopher",
"video",
"dip",
"ftp",
"lock",
"audio",
"nobody",
"users",
"dbus",
"utmp",
"utempter",
"usbmuxd",
"rpc",
"avdefs",
"floppy",
"vcsa",
"desktop_admin_r",
"desktop_user_r",
"rtkit",
"avahi-autoipd",
"cdrom",
"tape",
"dialout",
"wbpriv",
"cgred",
"saslauth",
"postdrop",
"postfix",
"rpcuser",
"nfsnobody",
"ntp",
"apache",
"radvd",
"haldaemon",
"kvm",
"qemu",
"pulse",
"pulse-access",
"fuse",
"ldap",
"nm-openconnect",
"gdm",
"stapusr",
"stapsys",
"stapdev",
"sshd",
"tcpdump",
"slocate",
"tify",
"screen",
"nginx"
]
10 years, 5 months
[RFC] discover Kimchi peers
by Sheldon
I'd like to talk about how to discover Kimchi peers.
Now I just talk about discover a peer in a same network here.
I will use a local multicast subnetwork address
<http://en.wikipedia.org/wiki/Multicast_address#Local_subnetwork> to
find peers in one network.
Choose 224.0.0.132 as the kimchi multicast address, and 8000 as the port.
For cross network that need the router support multicast, so I give up
discover a peer cross network.
I will let user add the remote peers manully.
In the whole system all peers are equal. There will not be a center
discover service.
We will define two kinds of multicast message Notify and Search.
the format as follow.
# ____________________________________________
# | head | message body | tail |
# |___________________|_________________|______|
# |sizeof(messageBody)| json message | EOL |
# |___________________|_________________|______|
the flow of discover Kimchi peers:
1. one host multicast a "search" message. in this message it tell
himself information, and ask others tell their information.
Like this:
{"search": {"domain": "kimchi-host1", "IP": "192.168.0.3", "httpport":
"8000", "httpsport": "8001"}}
this means "hello, I'm a kimchi host, this is my information, can
you tell me who you are?"
2. others received a search will response an "notify" message.
Like this:
{"notify": {"domain": "kimchi-host1", "IP": "192.168.0.3",
"httpport": "8000", "httpsport": "8001"}}
this tells others that "hi, I'm a kimchi host, I'm alive and this
is my information"
o (user) 1 is "search"
/\ --------> 2 is "notify"
| 1 _____ ________________
kimchi-host1 ------2-<---| DB |<----2-----|multicast listen |<--2--
| |____| |_______________|
|
----------------------1-------------------------------> |
|
_____ |_____
| |
| switch |
| |
|___________|
o (user) |
/\ --------- -----------------------------2----------------------- --->|
| | _____ ________________ |
kimchi-host3 ------1<---| DB |<---1------|multicast listen |<---1--|
|____| |_______________|
we need to discuss:
1. should we support beat heart?
every kimchi host will send periodic notify to tell others himself
information?
2. should we support a "quit" message?
"quit" message tell other peers, that this kimchi quit normally. others
can remove this from peers list.
But the kimchi can not send "quit" when aborting abnormally.
3. Do we store the local peers information in DB?
we can collection the local peers and send them immediately when user
need to discover the peers.
We will extend to support remote peers, these information need to be
stored in DB.
--
Thanks and best regards!
Sheldon Feng(???)<shaohef(a)linux.vnet.ibm.com>
IBM Linux Technology Center
10 years, 5 months
[RFC] create an image from VM for OOTB storage pool
by Sheldon
Now OOTB ISO pool is available.
we can copy an base image to OOTB ISO pool from VM.
There will useful for when user want to create a image from an existing VM.
User create a VM and configure this VM. He want to create several VMs
with this VM.
There are two ways for him.
1. use backing store
(http://libvirt.org/formatstorage.html#StorageVolBacking) for the
existing img
2. create an base image to OOTB ISO pool from the existing VM.
When are are snapshots on the VM base image.
we should merge the all snapshots and the base image.
Then he can create a template from this image.
And create a VM from this template.
--
Thanks and best regards!
Sheldon Feng(冯少合)<shaohef(a)linux.vnet.ibm.com>
IBM Linux Technology Center
10 years, 5 months
[PATCH] Update README.md to introduce startup script
by Ding xiao
We use different startup script in different
system, so it's nessesary introduce them.
Signed-off-by: Ding xiao <ssdxiao(a)163.com>
---
docs/README.md | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/docs/README.md b/docs/README.md
index ab03918..dbefae3 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -114,6 +114,21 @@ Run
$ sudo kimchid --host=0.0.0.0
+Use startup script in different system
+----------------------------------------
+
+Fedora:
+ $ systemctl start kimchid.service
+ $ systemctl stop kimchid.service
+
+Suse or Centos5:
+ $ service start kimchid
+ $ service stop kimchid
+
+Centos6 or Debian:
+ $ start kimchid
+ $ stop kimchid
+
Usage
-----
--
1.7.1
10 years, 5 months
[PATCH v3 1/2] UI changes to allow underscore in debug report name.
by Christy Perez
New message on the debug report creation screen now says that
underscore ('_') characters are allowed, as well as
hyphens ('-').
Signed-off-by: Christy Perez <christy(a)linux.vnet.ibm.com>
---
po/en_US.po | 12 ++++++------
po/pt_BR.po | 13 ++++++-------
po/zh_CN.po | 12 ++++++------
src/kimchi/API.json | 2 +-
src/kimchi/i18n.py | 2 +-
ui/js/src/kimchi.report_add_main.js | 2 +-
ui/pages/i18n.json.tmpl | 2 +-
ui/pages/report-add.html.tmpl | 2 +-
8 files changed, 23 insertions(+), 24 deletions(-)
diff --git a/po/en_US.po b/po/en_US.po
index 7b66eb2..933d4eb 100644
--- a/po/en_US.po
+++ b/po/en_US.po
@@ -703,9 +703,9 @@ msgid "You should give a name for the debug file report."
msgstr "You should give a name for the debug file report."
msgid ""
-"Name should be a string. Only letters, digits and hyphen ('-') are allowed."
+"Name should be a string. Only letters, digits, underscore ('_') and hyphen ('-') are allowed."
msgstr ""
-"Name should be a string. Only letters, digits and hyphen ('-') are allowed."
+"Name should be a string. Only letters, digits, underscore ('_') and hyphen ('-') are allowed."
#, python-format
msgid ""
@@ -1317,8 +1317,8 @@ msgstr "Rename"
msgid "Download"
msgstr "Download"
-msgid "Report name should contain only letters, digits and/or hyphen ('-')."
-msgstr "Report name should contain only letters, digits and/or hyphen ('-')."
+msgid "Report name should contain only letters, digits, underscore ('_') and/or hyphen ('-')."
+msgstr "Report name should contain only letters, digits, underscore ('_') and/or hyphen ('-')."
msgid "Pending..."
msgstr "Pending..."
@@ -1503,10 +1503,10 @@ msgstr "Report Name"
msgid ""
"The name used to identify the report. If omitted, a name will be chosen "
-"based on current time. Name can contain: letters, digits and hyphen (\"-\")."
+"based on current time. Name can contain: letters, digits, underscore ('_') and hyphen (\"-\")."
msgstr ""
"The name used to identify the report. If omitted, a name will be chosen "
-"based on current time. Name can contain: letters, digits and hyphen (\"-\")."
+"based on current time. Name can contain: letters, digits, underscore ('_') and hyphen (\"-\")."
msgid "Add a Repository"
msgstr "Add a Repository"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index b0884b4..f43a1c4 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -748,10 +748,9 @@ msgid "You should give a name for the debug file report."
msgstr "Você deve dar um nome para o arquivo do relatório de debug."
msgid ""
-"Name should be a string. Only letters, digits and hyphen ('-') are allowed."
+"Name should be a string. Only letters, digits, underscore ('_') and hyphen ('-') are allowed."
msgstr ""
-"Nome deve ser uma string. Somente letras, digitos e hífem ('-') são "
-"permitidos."
+"Nome deve ser uma string. Somente letras, digitos, underscore ('_') e hífem ('-') são permitidos."
#, python-format
msgid ""
@@ -1382,8 +1381,8 @@ msgstr "Renomear"
msgid "Download"
msgstr "Baixar"
-msgid "Report name should contain only letters, digits and/or hyphen ('-')."
-msgstr "Nome do relatório deve apenas conter letras, números e/ou hífen ('-')."
+msgid "Report name should contain only letters, digits, underscore ('_') and/or hyphen ('-')."
+msgstr "Nome do relatório deve apenas conter letras, números, underscore ('_') e/ou hífen ('-')."
msgid "Pending..."
msgstr "Pendente..."
@@ -1568,10 +1567,10 @@ msgstr "Nome do Relatório"
msgid ""
"The name used to identify the report. If omitted, a name will be chosen "
-"based on current time. Name can contain: letters, digits and hyphen (\"-\")."
+"based on current time. Name can contain: letters, digits, underscore ('_') and hyphen (\"-\")."
msgstr ""
"Se o nome do relatório for omitido, será escolhido um nome baseado no "
-"horário atual. O nome pode conter: letras, números e hífen ('-')."
+"horário atual. O nome pode conter: letras, números, underscore ('_') e hífen ('-')."
msgid "Add a Repository"
msgstr "Adicionar um Repositório"
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 272dd51..9e623c5 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -680,8 +680,8 @@ msgid "You should give a name for the debug file report."
msgstr "应该为诊断文件报告指定一个名字。"
msgid ""
-"Name should be a string. Only letters, digits and hyphen ('-') are allowed."
-msgstr "名字必须是一个字符串。只允许字母、数字和连字符 ('-')。"
+"Name should be a string. Only letters, digits, underscore ('_') and hyphen ('-') are allowed."
+msgstr "名字必须是一个字符串。只允许字母、数字、下划线 ('_') 和连字符 ('-')。"
#, python-format
msgid ""
@@ -1270,8 +1270,8 @@ msgstr "重命名"
msgid "Download"
msgstr "下载"
-msgid "Report name should contain only letters, digits and/or hyphen ('-')."
-msgstr "报告名字中只能包含字母、数字或连字符(-)。"
+msgid "Report name should contain only letters, digits, underscore ('_') and/or hyphen ('-')."
+msgstr "报告名字中只能包含字母、数字、下划线('_')和连字符('-')"
msgid "Pending..."
msgstr "正在加载..."
@@ -1441,10 +1441,10 @@ msgstr "诊断报告名"
msgid ""
"The name used to identify the report. If omitted, a name will be chosen "
-"based on current time. Name can contain: letters, digits and hyphen (\"-\")."
+"based on current time. Name can contain: letters, digits, underscore ('_') and hyphen (\"-\")."
msgstr ""
"名字用来标识诊断报告。如果省略,将会基于当前时间生成一个新名字。名字中可以包"
-"含字母、数字和连字符(-)"
+"含字母、数字、下划线 ('_') 和连字符(-)"
msgid "Add a Repository"
msgstr "增加一个软件仓库"
diff --git a/src/kimchi/API.json b/src/kimchi/API.json
index 6d1324c..d635d2c 100644
--- a/src/kimchi/API.json
+++ b/src/kimchi/API.json
@@ -36,7 +36,7 @@
"name": {
"description": "The name for the debug report file.",
"type": "string",
- "pattern": "^[A-Za-z0-9-]*$",
+ "pattern": "^[_A-Za-z0-9-]*$",
"error": "KCHDR0007E"
}
}
diff --git a/src/kimchi/i18n.py b/src/kimchi/i18n.py
index 91684b6..0c76145 100644
--- a/src/kimchi/i18n.py
+++ b/src/kimchi/i18n.py
@@ -206,7 +206,7 @@
"KCHDR0004E": _("Can not find any generated debug report matching name %(name)s"),
"KCHDR0005E": _("Unable to generate debug report %(name)s. Details: %(err)s"),
"KCHDR0006E": _("You should give a name for the debug file report."),
- "KCHDR0007E": _("Name should be a string. Only letters, digits and hyphen ('-') are allowed."),
+ "KCHDR0007E": _("Name should be a string. Only letters, digits, underscore ('_') and hyphen ('-') are allowed."),
"KCHDR0008E": _("The debug report with specified name \"%(name)s\" already exists. Please use another one."),
"KCHSR0001E": _("Storage server %(server)s was not used by Kimchi"),
diff --git a/ui/js/src/kimchi.report_add_main.js b/ui/js/src/kimchi.report_add_main.js
index 43484f5..f64b879 100644
--- a/ui/js/src/kimchi.report_add_main.js
+++ b/ui/js/src/kimchi.report_add_main.js
@@ -41,7 +41,7 @@ kimchi.report_add_main = function() {
return false;
}
var reportName = nameTextbox.val();
- var validator = RegExp("^[A-Za-z0-9-]*$");
+ var validator = RegExp("^[_A-Za-z0-9-]*$");
if (!validator.test(reportName)) {
kimchi.message.error.code('KCHDR6011M');
return false;
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
index d765cf2..c6f4e8c 100644
--- a/ui/pages/i18n.json.tmpl
+++ b/ui/pages/i18n.json.tmpl
@@ -113,7 +113,7 @@
"KCHDR6008M": "$_("Rename")",
"KCHDR6009M": "$_("Remove")",
"KCHDR6010M": "$_("Download")",
- "KCHDR6011M": "$_("Report name should contain only letters, digits and/or hyphen ('-').")",
+ "KCHDR6011M": "$_("Report name should contain only letters, digits, underscore ('_') and/or hyphen ('-').")",
"KCHDR6012M": "$_("Pending...")",
"KCHVM6001M": "$_("This will delete the virtual machine and its virtual disks. This operation cannot be undone. Would you like to continue?")",
diff --git a/ui/pages/report-add.html.tmpl b/ui/pages/report-add.html.tmpl
index b7209fe..74ef313 100644
--- a/ui/pages/report-add.html.tmpl
+++ b/ui/pages/report-add.html.tmpl
@@ -35,7 +35,7 @@
</h2>
<div class="field">
<span>
- $_("The name used to identify the report. If omitted, a name will be chosen based on current time. Name can contain: letters, digits and hyphen (\"-\").")
+ $_("The name used to identify the report. If omitted, a name will be chosen based on current time. Name can contain: letters, digits, underscore (\"_\") and hyphen (\"-\").")
</span>
<input type="text" class="text" id="report-name-textbox" name="name" />
</div>
--
1.9.3
10 years, 5 months
The Independence Day - Ginger is now public!
by Paulo Ricardo Paz Vital
Hello.
It's a pleasure to announce that today, July 4th - the Independence Day,
Ginger project, a Kimchi plugin for host management, becomes a public
open source project!
The project will use the following public infrastructure:
Code: GitHub
https://github.com/kimchi-project/ginger
Mailing List: ginger-dev(a)yahoogroups.com
Send an email to ginger-dev-subscribe(a)yahoogroups.com to join
the mailing list.
Thanks to everyone who has contributed to this exciting milestone for
this project!
--
Paulo Ricardo Paz Vital <pvital(a)linux.vnet.ibm.com>
IBM Linux Technology Center
10 years, 5 months
[PATCH v3] Add SUSE's products
by Dinar valeev
From: Dinar Valeev <dvaleev(a)suse.com>
Add SLES 12 information and set openSUSE's version to 13.1
Signed-off-by: Dinar Valeev <dvaleev(a)suse.com>
---
src/kimchi/isoinfo.py | 1 +
src/kimchi/osinfo.py | 7 +++++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/kimchi/isoinfo.py b/src/kimchi/isoinfo.py
index b7315e0..c394a32 100644
--- a/src/kimchi/isoinfo.py
+++ b/src/kimchi/isoinfo.py
@@ -95,6 +95,7 @@ iso_dir = [
'|HRM_CENA_X64CHKV|HRM_CPRA_X64FREV|HRM_CPRNA_X64FREV')),
('sles', '10', 'SLES10|SUSE-Linux-Enterprise-Server.001'),
('sles', '11', 'SUSE_SLES-11-0-0'),
+ ('sles', '12', 'SLE-12'),
('sles', lambda m: "11sp%s" % m.group(1), 'SLES-11-SP(\d+)'),
('opensuse', lambda m: m.group(1), 'openSUSE[ -](\d+\.\d+)'),
('opensuse', '11.1', 'SU1110.001'),
diff --git a/src/kimchi/osinfo.py b/src/kimchi/osinfo.py
index 093feca..39c9163 100644
--- a/src/kimchi/osinfo.py
+++ b/src/kimchi/osinfo.py
@@ -58,9 +58,12 @@ template_specs = {'x86': {'old': dict(common_spec, disk_bus='ide',
modern_version_bases = {'x86': {'debian': '6.0', 'ubuntu': '7.10',
'opensuse': '10.3', 'centos': '5.3',
- 'rhel': '6.0', 'fedora': '16', 'gentoo': '0'},
+ 'rhel': '6.0', 'fedora': '16', 'gentoo': '0',
+ 'sles': '11'},
'power': {'rhel': '7.0', 'fedora': '19',
- 'ubuntu': '14.04'}}
+ 'ubuntu': '14.04',
+ 'opensuse': '13.1',
+ 'sles': '12'}}
icon_available_distros = [icon[5:-4] for icon in glob.glob1('%s/images/'
% paths.ui_dir, 'icon-*.png')]
--
1.8.4.5
10 years, 5 months
[PATCH v2 0/2] Keep UI Consistent in Guest Edit Window
by Hongliang Wang
Make guest cdrom edit UI consistent with guest interface edit UI. The key point
is to edit cdrom properties in place. Because there is only one property can be
updated for a cdrom, it works fine this way. Though another inconsistence comes
up that in the same storage tab, there is also lines for disks, which have more
editable properties and it's not that easy to make all of these properties stay
in one line. So for disks, possibly we still need provide another window to let
users update properties.
So here are 2 choices:
C1) Apply this PATCH v2 to keep cdrom consistent with interface
C2) Apply PATCH v1 to keep cdrom consistent with disk
Both are OK for me.
v1 -> v2:
2a) Made updating cdrom properties in place
(Aline's comment)
Hongliang Wang (2):
Adjust Guest Edit Storage Tab Styles
Remove Unused Files
ui/css/theme-default/guest-cdrom-edit.css | 57 ------------
ui/css/theme-default/guest-edit.css | 99 +++++++-------------
ui/images/theme-default/guest-icon-sprite.png | Bin 6748 -> 0 bytes
ui/js/src/kimchi.guest_cdrom_edit_main.js | 85 ------------------
ui/js/src/kimchi.guest_edit_main.js | 125 +++++++++++++++++++++-----
ui/pages/guest-cdrom-edit.html.tmpl | 70 ---------------
ui/pages/guest-edit.html.tmpl | 57 +++++++-----
7 files changed, 166 insertions(+), 327 deletions(-)
delete mode 100644 ui/css/theme-default/guest-cdrom-edit.css
delete mode 100644 ui/images/theme-default/guest-icon-sprite.png
delete mode 100644 ui/js/src/kimchi.guest_cdrom_edit_main.js
delete mode 100644 ui/pages/guest-cdrom-edit.html.tmpl
--
1.8.1.4
10 years, 5 months