-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why no MoRefs in the TestHelper VMware.VimAutomation.Core? #74
Comments
Yes, for the example you have provided:
The three types can easily be replaced with the new type you proposed. The problem I see is that the new type should have the following structure:
So potentially this class will become very large, so we think the best solution is to have separate classes. |
Why would for example the UpdateDateTimeConfig method, need to be defined on the ManagedObjectReference class? |
Sorry, I think I have misunderstood your previous example. With the Type property you can specify the type for example HostDateTimeSystem and with the Value property you will pass the value of the object ? |
No, the Type and Value would behave as a regular MoRef. The reason for suggesting this, I can see code that will use this Get-View -Id format to retrieve vSphere objects. |
Yes this will be a good solution. Do you want to work on it ? |
Sure, I'll combine that with #75 |
Ok, I am assigning you to the issue. |
…nction in the TestHelpers module VMware.VimAutomation.Core now supports all parametersets * Fixes for issue #74 and #75 #74 Added class definition for ManagedObjectReference HostConfigManager now contains ManagedObjectReference entries #75 The Get-View function in the TestHelpers module VMware.VimAutomation.Core now supports all parametersets Signed-off-by: Luc Dekens <dekens.luc@gmail.com> * Small fixes on formatting Signed-off-by: SimeonGerginov <simeongerginov1@gmail.com>
Added to the repository via PR #82. Closing the issue. |
… build (#1) * Added class definition for ManagedObjectReference and The Get-View function in the TestHelpers module VMware.VimAutomation.Core now supports all parametersets * Fixes for issue vmware#74 and vmware#75 vmware#74 Added class definition for ManagedObjectReference HostConfigManager now contains ManagedObjectReference entries vmware#75 The Get-View function in the TestHelpers module VMware.VimAutomation.Core now supports all parametersets Signed-off-by: Luc Dekens <dekens.luc@gmail.com> * Small fixes on formatting Signed-off-by: SimeonGerginov <simeongerginov1@gmail.com> * Travis update: (Build 76) [skip ci] Signed-off-by: Travis CI <travis@travis-ci.org>
In the testhelper module VMware.VimAutomation.Core properties that should be of type ManagedObjectReference, are defined as the actual object.
For example:
public class HostConfigManager
{
public HostDateTimeSystem DateTimeSystem { get; set; }
public ManagedObjectReference NetworkSystem { get; set; }
public HostServiceSystem ServiceSystem { get; set; }
}
Where I would expect
public class HostConfigManager
{
public ManagedObjectReference DateTimeSystem { get; set; }
public ManagedObjectReference NetworkSystem { get; set; }
public ManagedObjectReference ServiceSystem { get; set; }
}
with a new object
public class ManagedObjectReference : System.IEquatable
{
public string Type { get; set; }
public string Value { get; set; }
...
This has impact on how the Mocks are set up.
Am I missing something?
The text was updated successfully, but these errors were encountered: