コード例 #1
0
        public IObservable <CIMResourceAllocationSettingData> DependentAsync(CIMResourcePool inAntecedent, CimOperationOptions options = null)
        {
            var scope     = _scope;
            var instances = _resolver.ResolveTargetAsync(scope, inAntecedent.AsCimInstance(), options);

            return(instances.Select(i => (CIMResourceAllocationSettingData)scope.Mapper.Create(scope, i)));
        }
コード例 #2
0
        public IEnumerable <CIMLogicalElement> Dependent(CIMResourcePool inAntecedent, CimOperationOptions options = null)
        {
            var scope     = _scope;
            var instances = _resolver.ResolveTarget(scope, inAntecedent.AsCimInstance(), options);

            return(instances.Select(i => (CIMLogicalElement)scope.Mapper.Create(scope, i)));
        }
コード例 #3
0
        public IObservable <MsvmComputerSystem> GroupComponentAsync(CIMResourcePool inPartComponent, CimOperationOptions options = null)
        {
            var scope     = _scope;
            var instances = _resolver.ResolveSourceAsync(scope, inPartComponent.AsCimInstance(), options);

            return(instances.Select(i => (MsvmComputerSystem)scope.Mapper.Create(scope, i)));
        }
コード例 #4
0
        public (System.UInt32 retval, CIMConcreteJob outJob) DeleteResourcePool(CIMResourcePool inPool)
        {
            var parameters = new CimMethodParametersCollection();

            if (inPool != null)
            {
                parameters.Add(CimMethodParameter.Create("Pool", inPool.AsCimInstance(), CimType.Reference, inPool == null ? CimFlags.NullValue : CimFlags.None));
            }
            var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "DeleteResourcePool", parameters);

            return((System.UInt32)result.ReturnValue.Value, (CIMConcreteJob)InfrastuctureObjectScope.Mapper.Create(InfrastuctureObjectScope, (CimInstance)result.OutParameters["Job"].Value));
        }
コード例 #5
0
        public (System.UInt32 retval, CIMConcreteJob outJob) RemoveResourcesFromResourcePool(IEnumerable <CIMLogicalDevice> inHostResources, CIMResourcePool inPool)
        {
            var parameters = new CimMethodParametersCollection();

            if (inHostResources != null)
            {
                parameters.Add(CimMethodParameter.Create("HostResources", inHostResources.AsCimInstance(), CimType.ReferenceArray, inHostResources == null ? CimFlags.NullValue : CimFlags.None));
            }
            if (inPool != null)
            {
                parameters.Add(CimMethodParameter.Create("Pool", inPool.AsCimInstance(), CimType.Reference, inPool == null ? CimFlags.NullValue : CimFlags.None));
            }
            var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "RemoveResourcesFromResourcePool", parameters);

            return((System.UInt32)result.ReturnValue.Value, (CIMConcreteJob)InfrastuctureObjectScope.Mapper.Create(InfrastuctureObjectScope, (CimInstance)result.OutParameters["Job"].Value));
        }
コード例 #6
0
        public (System.UInt32 retval, CIMConcreteJob outJob) ChangeParentResourcePool(CIMResourcePool inChildPool, IEnumerable <CIMResourcePool> inParentPool, System.String[] inSettings)
        {
            var parameters = new CimMethodParametersCollection();

            if (inChildPool != null)
            {
                parameters.Add(CimMethodParameter.Create("ChildPool", inChildPool.AsCimInstance(), CimType.Reference, inChildPool == null ? CimFlags.NullValue : CimFlags.None));
            }
            if (inParentPool != null)
            {
                parameters.Add(CimMethodParameter.Create("ParentPool", inParentPool.AsCimInstance(), CimType.ReferenceArray, inParentPool == null ? CimFlags.NullValue : CimFlags.None));
            }
            if (inSettings != null)
            {
                parameters.Add(CimMethodParameter.Create("Settings", inSettings, CimType.StringArray, inSettings == null ? CimFlags.NullValue : CimFlags.None));
            }
            var result = InfrastuctureObjectScope.CimSession.InvokeMethod(InnerCimInstance, "ChangeParentResourcePool", parameters);

            return((System.UInt32)result.ReturnValue.Value, (CIMConcreteJob)InfrastuctureObjectScope.Mapper.Create(InfrastuctureObjectScope, (CimInstance)result.OutParameters["Job"].Value));
        }