# **********************************************************
# Copyright 2011-2015 VMware, Inc.  All rights reserved. -- VMware Confidential
# **********************************************************
from .VmomiSupport import Object, ManagedObject

class StubAdapterAccessorMixin:
   def __init__(self):
      pass

   ## Retrieve a managed property
   #
   # @param self self
   # @param mo managed object
   # @param info property info
   def InvokeAccessor(self, mo, info):
      prop = info.name
      param = Object(name="prop", type=str, version=self.version,
                     flags=0)
      info = Object(name=info.name, type=ManagedObject, wsdlName="Fetch",
                    version=info.version, params=(param,),
                    isTask=False, resultFlags=info.flags,
                    result=info.type, methodResult=info.type)
      return self.InvokeMethod(mo, info, (prop,))
