]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
Osstest/Testsupport.pm: use get_target_property() for some host setup
authorRobert Ho <robert.hu@intel.com>
Sat, 31 Oct 2015 05:42:03 +0000 (13:42 +0800)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 13 Nov 2015 12:42:16 +0000 (12:42 +0000)
For nested cases, nested host can inherit its host's property for
dhcp watch setup and ether_prefix property setup.

Signed-off-by: Robert Ho <robert.hu@intel.com>
Tested-by: Robert Ho <robert.hu@intel.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v15: New patch

Osstest/TestSupport.pm

index cb496d20076cd86f55c99a53eb6f7df181af0c0e..32f29561a3d30deff6fd683a0157ceb62e2a3a1a 100644 (file)
@@ -735,7 +735,7 @@ sub lv_dev_mapper ($$) {
 sub dhcp_watch_setup ($$) {
     my ($ho,$gho) = @_;
 
-    my $meth = get_host_property($ho,'dhcp-watch-method',undef);
+    my $meth = get_target_property($ho,'dhcp-watch-method',undef);
     $gho->{DhcpWatch} = get_host_method_object($ho, 'DhcpWatch', $meth);
 }
 
@@ -1583,7 +1583,7 @@ sub target_choose_vg ($$) {
 
 sub ether_prefix($) {
     my ($ho) = @_;
-    my $prefix = get_host_property($ho, 'gen-ether-prefix-base');
+    my $prefix = get_target_property($ho, 'gen-ether-prefix-base');
     $prefix =~ m/^(\w+:\w+):(\w+):(\w+)$/ or die "$prefix ?";
     my $lhs = $1;
     my $pv = (hex($2)<<8) | (hex($3));