[Kimchi-devel] [PATCH] Remove the unnecessary 'exposed'

Paulo Ricardo Paz Vital pvital at linux.vnet.ibm.com
Wed Jan 29 14:07:00 UTC 2014


-- 
Reviewed-by: Paulo Vital <pvital at linux.vnet.ibm.com>


On Wed, 2014-01-29 at 07:10 +0800, Mark Wu wrote:
> 'exposed' is only need to be set when a leaf hander is exposed,
> so this patch removes the usages on resources.
> 
> Signed-off-by: Mark Wu <wudxw at linux.vnet.ibm.com>
> ---
>  src/kimchi/control/config.py       | 2 --
>  src/kimchi/control/host.py         | 2 --
>  src/kimchi/control/storagepools.py | 1 -
>  3 files changed, 5 deletions(-)
> 
> diff --git a/src/kimchi/control/config.py b/src/kimchi/control/config.py
> index cc41e8a..c28e6e3 100644
> --- a/src/kimchi/control/config.py
> +++ b/src/kimchi/control/config.py
> @@ -35,9 +35,7 @@ class Config(Resource):
>      def __init__(self, model, id=None):
>          super(Config, self).__init__(model, id)
>          self.capabilities = Capabilities(self.model)
> -        self.capabilities.exposed = True
>          self.distros = Distros(model)
> -        self.distros.exposed = True
> 
>      @property
>      def data(self):
> diff --git a/src/kimchi/control/host.py b/src/kimchi/control/host.py
> index f041b35..053c822 100644
> --- a/src/kimchi/control/host.py
> +++ b/src/kimchi/control/host.py
> @@ -35,9 +35,7 @@ class Host(Resource):
>          self.reboot = self.generate_action_handler('reboot')
>          self.shutdown = self.generate_action_handler('shutdown')
>          self.stats = HostStats(self.model)
> -        self.stats.exposed = True
>          self.partitions = Partitions(self.model)
> -        self.partitions.exposed = True
> 
>      @property
>      def data(self):
> diff --git a/src/kimchi/control/storagepools.py b/src/kimchi/control/storagepools.py
> index 3b8ef79..01078ba 100644
> --- a/src/kimchi/control/storagepools.py
> +++ b/src/kimchi/control/storagepools.py
> @@ -40,7 +40,6 @@ class StoragePools(Collection):
>          super(StoragePools, self).__init__(model)
>          self.resource = StoragePool
>          isos = IsoPool(model)
> -        isos.exposed = True
>          setattr(self, ISO_POOL_NAME, isos)
> 
>      def create(self, *args):




More information about the Kimchi-devel mailing list