* [Patch][RFC] xend config list
@ 2007-09-14 7:27 Akio Takebe
2007-09-14 20:06 ` John Levon
2007-09-18 0:08 ` Aron Griffis
0 siblings, 2 replies; 8+ messages in thread
From: Akio Takebe @ 2007-09-14 7:27 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 2224 bytes --]
Hi, all
I made the patch to show xoptions.
We can get infomation of xend configuration with my patch.
How about this?
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
# xm list --x
config_default : /etc/xen/xend-config.sxp
xoptions.config_path : /etc/xen/xend-config.sxp
xoptions.config_var : XEND_CONFIG
xoptions.dom0_min_mem_default : 0
dom0_vcpus_default : 0
external_migration_tool_default :
logfile_default : /var/log/xen/xend.log
loglevel_default : DEBUG
netback_type : netfront
network_script_dir : /etc/xen/scripts
vif_script : vif-bridge
vncpasswd_default : None
xen_api_server_default : [['unix']]
xend_address_default :
xend_domains_path_default : /var/lib/xend/domains
xend_http_server_default : no
xend_port_default : 8000
xend_relocation_address_default :
xend_relocation_hosts_allow_default :
xend_relocation_port_default : 8002
xend_relocation_server_default : no
xend_state_path_default : /var/lib/xend/state
xend_storage_path_default : /var/lib/xend/storage
xend_tcp_xmlrpc_server_address_default : localhost
xend_tcp_xmlrpc_server_default : no
xend_tcp_xmlrpc_server_port_default : 8006
xend_unix_path_default : /var/lib/xend/xend-socket
xend_unix_server_default : no
xend_unix_xmlrpc_server_default : yes
xend_vnc_listen_default : 127.0.0.1
config:
xend-config
['loglevel', 'DEBUG']
['xen-api-server', [['9363', 'pam']]]
['xend-relocation-server', 'yes']
['xend-relocation-hosts-allow', '^localhost$ ^localhost\\.localdomain$']
['network-script', 'network-bridge']
['vif-script', 'vif-bridge']
['dom0-min-mem', '196']
['dom0-cpus', '0']
['enable-dump', 'yes']
['vnc-listen', '0.0.0.0']
['vncpasswd', '']
Best Regards,
Akio Takebe
[-- Attachment #2: xend_config_list.patch --]
[-- Type: application/octet-stream, Size: 3986 bytes --]
diff -r 42b925c00d8a tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py Mon Sep 10 13:58:56 2007 -0600
+++ b/tools/python/xen/xm/main.py Fri Sep 14 05:11:51 2007 +0900
@@ -55,6 +55,9 @@ from xen.util.acmpolicy import ACM_LABEL
import XenAPI
+import inspect
+from xen.xend import XendOptions
+xoptions = XendOptions.instance()
# getopt.gnu_getopt is better, but only exists in Python 2.3+. Use
# getopt.getopt if gnu_getopt is not available. This will mean that options
@@ -807,11 +810,12 @@ def xm_list(args):
def xm_list(args):
use_long = 0
show_vcpus = 0
+ show_xend = 0
show_labels = 0
state = 'all'
try:
- (options, params) = getopt.gnu_getopt(args, 'lv',
- ['long','vcpus','label',
+ (options, params) = getopt.gnu_getopt(args, 'lvx',
+ ['long','vcpus','xend','label',
'state='])
except getopt.GetoptError, opterr:
err(opterr)
@@ -822,10 +826,49 @@ def xm_list(args):
use_long = 1
if k in ['-v', '--vcpus']:
show_vcpus = 1
+ if k in ['-x', '--xend']:
+ show_xend = 1
if k in ['--label']:
show_labels = 1
if k in ['--state']:
state = v
+
+ if show_xend:
+ print 'config_default\t\t\t\t: ',xoptions.config_default
+ print 'xoptions.config_path\t\t\t: ',xoptions.config_path
+ print 'xoptions.config_var\t\t\t: ',xoptions.config_var
+ print 'xoptions.dom0_min_mem_default\t\t: ',xoptions.dom0_min_mem_default
+ print 'dom0_vcpus_default\t\t\t: ',xoptions.dom0_vcpus_default
+ print 'external_migration_tool_default\t\t: ',xoptions.external_migration_tool_default
+ print 'logfile_default\t\t\t\t: ',xoptions.logfile_default
+ print 'loglevel_default\t\t\t: ',xoptions.loglevel_default
+ print 'netback_type\t\t\t\t: ',xoptions.netback_type
+ print 'network_script_dir\t\t\t: ',xoptions.network_script_dir
+ print 'vif_script\t\t\t\t: ',xoptions.vif_script
+ print 'vncpasswd_default\t\t\t: ',xoptions.vncpasswd_default
+ print 'xen_api_server_default\t\t\t: ',xoptions.xen_api_server_default
+ print 'xend_address_default\t\t\t: ',xoptions.xend_address_default
+ print 'xend_domains_path_default\t\t: ',xoptions.xend_domains_path_default
+ print 'xend_http_server_default\t\t: ',xoptions.xend_http_server_default
+ print 'xend_port_default\t\t\t: ',xoptions.xend_port_default
+ print 'xend_relocation_address_default\t\t: ',xoptions.xend_relocation_address_default
+ print 'xend_relocation_hosts_allow_default\t: ',xoptions.xend_relocation_hosts_allow_default
+ print 'xend_relocation_port_default\t\t: ',xoptions.xend_relocation_port_default
+ print 'xend_relocation_server_default\t\t: ',xoptions.xend_relocation_server_default
+ print 'xend_state_path_default\t\t\t: ',xoptions.xend_state_path_default
+ print 'xend_storage_path_default\t\t: ',xoptions.xend_storage_path_default
+ print 'xend_tcp_xmlrpc_server_address_default\t: ',xoptions.xend_tcp_xmlrpc_server_address_default
+ print 'xend_tcp_xmlrpc_server_default\t\t: ',xoptions.xend_tcp_xmlrpc_server_default
+ print 'xend_tcp_xmlrpc_server_port_default\t: ',xoptions.xend_tcp_xmlrpc_server_port_default
+ print 'xend_unix_path_default\t\t\t: ',xoptions.xend_unix_path_default
+ print 'xend_unix_server_default\t\t: ',xoptions.xend_unix_server_default
+ print 'xend_unix_xmlrpc_server_default\t\t: ',xoptions.xend_unix_xmlrpc_server_default
+ print 'xend_vnc_listen_default\t\t\t: ',xoptions.xend_vnc_listen_default
+ print 'config:'
+ for i in xoptions.config:
+ print " ",i
+
+ return
if state != 'all' and len(params) > 0:
raise OptionError(
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [Patch][RFC] xend config list
2007-09-14 7:27 [Patch][RFC] xend config list Akio Takebe
@ 2007-09-14 20:06 ` John Levon
2007-09-17 23:57 ` Akio Takebe
2007-09-18 0:08 ` Aron Griffis
1 sibling, 1 reply; 8+ messages in thread
From: John Levon @ 2007-09-14 20:06 UTC (permalink / raw)
To: Akio Takebe; +Cc: xen-devel
On Fri, Sep 14, 2007 at 04:27:40PM +0900, Akio Takebe wrote:
> I made the patch to show xoptions.
> We can get infomation of xend configuration with my patch.
> How about this?
>
> Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
>
> # xm list --x
xm list is for showing domains, please don't subvert it to do something
different. Add a new command or something...
john
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch][RFC] xend config list
2007-09-14 20:06 ` John Levon
@ 2007-09-17 23:57 ` Akio Takebe
0 siblings, 0 replies; 8+ messages in thread
From: Akio Takebe @ 2007-09-17 23:57 UTC (permalink / raw)
To: John Levon; +Cc: xen-devel, Akio Takebe
Hi, John and all
>> I made the patch to show xoptions.
>> We can get infomation of xend configuration with my patch.
>> How about this?
>>
>> Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
>>
>> # xm list --x
>
>xm list is for showing domains, please don't subvert it to do something
>different. Add a new command or something...
Thank you for you comment.
How about "xm info"?
Best Regards,
Akio Takebe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch][RFC] xend config list
2007-09-14 7:27 [Patch][RFC] xend config list Akio Takebe
2007-09-14 20:06 ` John Levon
@ 2007-09-18 0:08 ` Aron Griffis
2007-09-18 1:00 ` Akio Takebe
1 sibling, 1 reply; 8+ messages in thread
From: Aron Griffis @ 2007-09-18 0:08 UTC (permalink / raw)
To: Akio Takebe; +Cc: xen-devel
Hi Akio,
Akio Takebe wrote: [Fri Sep 14 2007, 03:27:40AM EDT]
> + if show_xend:
> + print 'config_default\t\t\t\t: ',xoptions.config_default
> + print 'xoptions.config_path\t\t\t: ',xoptions.config_path
> + print 'xoptions.config_var\t\t\t: ',xoptions.config_var
> + print 'xoptions.dom0_min_mem_default\t\t: ',xoptions.dom0_min_mem_default
> + print 'dom0_vcpus_default\t\t\t: ',xoptions.dom0_vcpus_default
> + print 'external_migration_tool_default\t\t: ',xoptions.external_migration_tool_default
> + print 'logfile_default\t\t\t\t: ',xoptions.logfile_default
> + print 'loglevel_default\t\t\t: ',xoptions.loglevel_default
> + print 'netback_type\t\t\t\t: ',xoptions.netback_type
> + print 'network_script_dir\t\t\t: ',xoptions.network_script_dir
> + print 'vif_script\t\t\t\t: ',xoptions.vif_script
> + print 'vncpasswd_default\t\t\t: ',xoptions.vncpasswd_default
> + print 'xen_api_server_default\t\t\t: ',xoptions.xen_api_server_default
> + print 'xend_address_default\t\t\t: ',xoptions.xend_address_default
> + print 'xend_domains_path_default\t\t: ',xoptions.xend_domains_path_default
> + print 'xend_http_server_default\t\t: ',xoptions.xend_http_server_default
> + print 'xend_port_default\t\t\t: ',xoptions.xend_port_default
> + print 'xend_relocation_address_default\t\t: ',xoptions.xend_relocation_address_default
> + print 'xend_relocation_hosts_allow_default\t: ',xoptions.xend_relocation_hosts_allow_default
> + print 'xend_relocation_port_default\t\t: ',xoptions.xend_relocation_port_default
> + print 'xend_relocation_server_default\t\t: ',xoptions.xend_relocation_server_default
> + print 'xend_state_path_default\t\t\t: ',xoptions.xend_state_path_default
> + print 'xend_storage_path_default\t\t: ',xoptions.xend_storage_path_default
> + print 'xend_tcp_xmlrpc_server_address_default\t: ',xoptions.xend_tcp_xmlrpc_server_address_default
> + print 'xend_tcp_xmlrpc_server_default\t\t: ',xoptions.xend_tcp_xmlrpc_server_default
> + print 'xend_tcp_xmlrpc_server_port_default\t: ',xoptions.xend_tcp_xmlrpc_server_port_default
> + print 'xend_unix_path_default\t\t\t: ',xoptions.xend_unix_path_default
> + print 'xend_unix_server_default\t\t: ',xoptions.xend_unix_server_default
> + print 'xend_unix_xmlrpc_server_default\t\t: ',xoptions.xend_unix_xmlrpc_server_default
> + print 'xend_vnc_listen_default\t\t\t: ',xoptions.xend_vnc_listen_default
> + print 'config:'
> + for i in xoptions.config:
> + print " ",i
This long list is bound to go stale pretty quickly. I'm not a python
expert but surely there's a way to loop through the values you want to
show?
Thanks,
Aron
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch][RFC] xend config list
2007-09-18 0:08 ` Aron Griffis
@ 2007-09-18 1:00 ` Akio Takebe
2007-09-18 6:05 ` John Levon
0 siblings, 1 reply; 8+ messages in thread
From: Akio Takebe @ 2007-09-18 1:00 UTC (permalink / raw)
To: Aron Griffis; +Cc: xen-devel, Akio Takebe
Hi, Aron
>Akio Takebe wrote: [Fri Sep 14 2007, 03:27:40AM EDT]
>> + if show_xend:
>> + print 'config_default\t\t\t\t: ',xoptions.config_default
>> + print 'xoptions.config_path\t\t\t: ',xoptions.config_path
>> + print 'xoptions.config_var\t\t\t: ',xoptions.config_var
[snip..]
>> xend_unix_server_default
>> + print 'xend_unix_xmlrpc_server_default\t\t: ',xoptions.
>> xend_unix_xmlrpc_server_default
>> + print 'xend_vnc_listen_default\t\t\t: ',xoptions.
>> xend_vnc_listen_default
>> + print 'config:'
>> + for i in xoptions.config:
>> + print " ",i
>
>This long list is bound to go stale pretty quickly. I'm not a python
>expert but surely there's a way to loop through the values you want to
>show?
Thank you for your comment.
It's good idea, I'll try to find the way.
If anybody know that, please tell me.
Best Regards,
Akio Takebe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch][RFC] xend config list
2007-09-18 1:00 ` Akio Takebe
@ 2007-09-18 6:05 ` John Levon
2007-09-18 13:00 ` Aron Griffis
0 siblings, 1 reply; 8+ messages in thread
From: John Levon @ 2007-09-18 6:05 UTC (permalink / raw)
To: Akio Takebe; +Cc: Aron Griffis, xen-devel
On Tue, Sep 18, 2007 at 10:00:00AM +0900, Akio Takebe wrote:
> >This long list is bound to go stale pretty quickly. I'm not a python
> >expert but surely there's a way to loop through the values you want to
> >show?
>
> Thank you for your comment.
> It's good idea, I'll try to find the way.
> If anybody know that, please tell me.
Searching for "python introspection" would be a good place to start I
think.
I think 'xm info' is still a little too generic. How about 'xm
config-list' ? Anyone?
regards
john
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Patch][RFC] xend config list
2007-09-18 6:05 ` John Levon
@ 2007-09-18 13:00 ` Aron Griffis
2007-09-18 16:22 ` John Levon
0 siblings, 1 reply; 8+ messages in thread
From: Aron Griffis @ 2007-09-18 13:00 UTC (permalink / raw)
To: John Levon; +Cc: xen-devel, Akio Takebe
John Levon wrote: [Tue Sep 18 2007, 02:05:12AM EDT]
> I think 'xm info' is still a little too generic. How about 'xm
> config-list' ? Anyone?
Actually I was thinking "xm info --config" might work. "xm info
--help" says "Get information about Xen host." This seems to fit
under that heading.
Aron
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-09-18 16:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-14 7:27 [Patch][RFC] xend config list Akio Takebe
2007-09-14 20:06 ` John Levon
2007-09-17 23:57 ` Akio Takebe
2007-09-18 0:08 ` Aron Griffis
2007-09-18 1:00 ` Akio Takebe
2007-09-18 6:05 ` John Levon
2007-09-18 13:00 ` Aron Griffis
2007-09-18 16:22 ` John Levon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.