Closed eilam20 closed 1 year ago
Specs found a good issue, looks like you need to subclass the PhysicalServerProfileTemplate under your PhysicalInfraManager (make sure to remember the require_nested :PhysicalServerProfileTemplate
Specs found a good issue, looks like you need to subclass the PhysicalServerProfileTemplate under your PhysicalInfraManager (make sure to remember the
require_nested :PhysicalServerProfileTemplate
I added the require_nested :PhysicalServerProfileTemplate to the PhysicalInfraManager in plugins/manageiq-providers-cisco_intersight/app/models/manageiq/providers/cisco_intersight/physical_infra_manager.rb
is it ok? can you rerun the tests?
@eilam20 looks like the vcr was manually edited, and since you have your 2.times
in the it
with the :vcr
option, you need to add it twice. Usually we like to have a VCR.use_cassette
in the 2.times
block so you don't have double the HTTP interactions but short cut you can just add the same block twice.
If you want to allow maintainer edits I can push my local changes where I got this green
If you want to allow maintainer edits I can push my local changes where I got this green
I pushed the change, but how can I allow maintainer edits?
@eilam20 you can also run the specs locally by running bundle exec rake
to check if the tests pass, github actions is annoying and I have to approve the workflow run everytime you push a change.
commit f6070d8b1f305b5277ae3e86878a669bce0cbc18
Author: Adam Grare <adam@grare.com>
Date: Tue Nov 29 16:49:37 2022 -0500
Fix VCR ProfileTemplates HTTP interaction
diff --git a/spec/vcr_cassettes/ManageIQ_Providers_CiscoIntersight_PhysicalInfraManager_Refresher/refresh/will_perform_a_full_refresh.yml b/spec/vcr_cassettes/ManageIQ_Providers_CiscoIntersight_PhysicalInfraManager_Refresher/refresh/will_perform_a_full_refresh.yml
index e77e9f9..ad49af2 100644
--- a/spec/vcr_cassettes/ManageIQ_Providers_CiscoIntersight_PhysicalInfraManager_Refresher/refresh/will_perform_a_full_refresh.yml
+++ b/spec/vcr_cassettes/ManageIQ_Providers_CiscoIntersight_PhysicalInfraManager_Refresher/refresh/will_perform_a_full_refresh.yml
@@ -64246,7 +64246,7 @@ http_interactions:
recorded_at: Thu, 12 May 2022 13:47:31 GMT
- request:
method: get
- uri: https://intersight.com/api/v1/server/ProfilesTemplates
+ uri: https://intersight.com/api/v1/server/ProfileTemplates
body:
encoding: US-ASCII
string: ''
@@ -64324,108 +64324,108 @@ http_interactions:
{
"ObjectType": "server.ProfileTemplate.List",
"Results": [
- {
- "ClassId": "server.ProfileTemplate",
- "ObjectType": "server.ProfileTemplate",
- "AccountMoid": "5ed10e437564612d3352cc2d",
- "CreateTime": "2022-10-12T16:53:46.348Z",
- "DomainGroupMoid": "5ed10e437564612d3352cc37",
- "ModTime": "2022-11-29T12:32:37.902Z",
- "Moid": "6346f11a77696e2d300b6049",
- "Owners": [
- "5ed10e437564612d3352cc2d"
- ],
- "SharedScope": "",
- "Tags": [
+ {
+ "ClassId": "server.ProfileTemplate",
+ "ObjectType": "server.ProfileTemplate",
+ "AccountMoid": "5ed10e437564612d3352cc2d",
+ "CreateTime": "2022-10-12T16:53:46.348Z",
+ "DomainGroupMoid": "5ed10e437564612d3352cc37",
+ "ModTime": "2022-11-29T12:32:37.902Z",
+ "Moid": "6346f11a77696e2d300b6049",
+ "Owners": [
+ "5ed10e437564612d3352cc2d"
+ ],
+ "SharedScope": "",
+ "Tags": [
- ],
- "VersionContext": null,
- "Ancestors": [
+ ],
+ "VersionContext": null,
+ "Ancestors": [
- ],
- "PermissionResources": [
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "organization.Organization",
- "Moid": "631803456972652d3097eb8d",
- "link": "https://www.intersight.com/api/v1/organization/Organizations/631803456972652d3097eb8d"
- }
- ],
- "DisplayNames": null,
- "Description": "",
- "Name": "xLabs-Development",
- "Type": "instance",
- "Action": "No-op",
- "ConfigContext": {
- "ClassId": "policy.ConfigContext",
- "ObjectType": "policy.ConfigContext",
- "ConfigState": "",
- "ConfigType": "",
- "ControlAction": "ConfigChange",
- "ErrorState": "",
- "OperState": ""
- },
- "PolicyBucket": [
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "bios.Policy",
- "Moid": "6346f13e6275722d30ed4a0e",
- "link": "https://www.intersight.com/api/v1/bios/Policies/6346f13e6275722d30ed4a0e"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "access.Policy",
- "Moid": "6346f21c6275722d30ed6144",
- "link": "https://www.intersight.com/api/v1/access/Policies/6346f21c6275722d30ed6144"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "ipmioverlan.Policy",
- "Moid": "6346f2356275722d30ed63d9",
- "link": "https://www.intersight.com/api/v1/ipmioverlan/Policies/6346f2356275722d30ed63d9"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "iam.EndPointUserPolicy",
- "Moid": "6346f26b6275722d30ed691f",
- "link": "https://www.intersight.com/api/v1/iam/EndPointUserPolicies/6346f26b6275722d30ed691f"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "kvm.Policy",
- "Moid": "6347308a6275722d30f410e2",
- "link": "https://www.intersight.com/api/v1/kvm/Policies/6347308a6275722d30f410e2"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "boot.PrecisionPolicy",
- "Moid": "6346f1b26275722d30ed5613",
- "link": "https://www.intersight.com/api/v1/boot/PrecisionPolicies/6346f1b26275722d30ed5613"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "vnic.LanConnectivityPolicy",
- "Moid": "634846a5ea6a1292fc328d82",
- "link": "https://www.intersight.com/api/v1/vnic/LanConnectivityPolicies/634846a5ea6a1292fc328d82"
- }
- ],
- "TargetPlatform": "FIAttached",
- "UuidAddressType": "NONE",
- "Usage": 1,
- "Organization": {
- "ClassId": "mo.MoRef",
- "ObjectType": "organization.Organization",
- "Moid": "631803456972652d3097eb8d",
- "link": "https://www.intersight.com/api/v1/organization/Organizations/631803456972652d3097eb8d"
- }
- }
- ]
+ ],
+ "PermissionResources": [
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "organization.Organization",
+ "Moid": "631803456972652d3097eb8d",
+ "link": "https://www.intersight.com/api/v1/organization/Organizations/631803456972652d3097eb8d"
+ }
+ ],
+ "DisplayNames": null,
+ "Description": "",
+ "Name": "xLabs-Development",
+ "Type": "instance",
+ "Action": "No-op",
+ "ConfigContext": {
+ "ClassId": "policy.ConfigContext",
+ "ObjectType": "policy.ConfigContext",
+ "ConfigState": "",
+ "ConfigType": "",
+ "ControlAction": "ConfigChange",
+ "ErrorState": "",
+ "OperState": ""
+ },
+ "PolicyBucket": [
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "bios.Policy",
+ "Moid": "6346f13e6275722d30ed4a0e",
+ "link": "https://www.intersight.com/api/v1/bios/Policies/6346f13e6275722d30ed4a0e"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "access.Policy",
+ "Moid": "6346f21c6275722d30ed6144",
+ "link": "https://www.intersight.com/api/v1/access/Policies/6346f21c6275722d30ed6144"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "ipmioverlan.Policy",
+ "Moid": "6346f2356275722d30ed63d9",
+ "link": "https://www.intersight.com/api/v1/ipmioverlan/Policies/6346f2356275722d30ed63d9"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "iam.EndPointUserPolicy",
+ "Moid": "6346f26b6275722d30ed691f",
+ "link": "https://www.intersight.com/api/v1/iam/EndPointUserPolicies/6346f26b6275722d30ed691f"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "kvm.Policy",
+ "Moid": "6347308a6275722d30f410e2",
+ "link": "https://www.intersight.com/api/v1/kvm/Policies/6347308a6275722d30f410e2"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "boot.PrecisionPolicy",
+ "Moid": "6346f1b26275722d30ed5613",
+ "link": "https://www.intersight.com/api/v1/boot/PrecisionPolicies/6346f1b26275722d30ed5613"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "vnic.LanConnectivityPolicy",
+ "Moid": "634846a5ea6a1292fc328d82",
+ "link": "https://www.intersight.com/api/v1/vnic/LanConnectivityPolicies/634846a5ea6a1292fc328d82"
+ }
+ ],
+ "TargetPlatform": "FIAttached",
+ "UuidAddressType": "NONE",
+ "Usage": 1,
+ "Organization": {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "organization.Organization",
+ "Moid": "631803456972652d3097eb8d",
+ "link": "https://www.intersight.com/api/v1/organization/Organizations/631803456972652d3097eb8d"
+ }
+ }
+ ]
}
http_version:
recorded_at: Thu, 12 May 2022 13:46:56 GMT
- request:
method: get
- uri: https://intersight.com/api/v1/server/ProfilesTemplates
+ uri: https://intersight.com/api/v1/server/ProfileTemplates
body:
encoding: US-ASCII
string: ''
@@ -64503,102 +64503,102 @@ http_interactions:
{
"ObjectType": "server.ProfileTemplate.List",
"Results": [
- {
- "ClassId": "server.ProfileTemplate",
- "ObjectType": "server.ProfileTemplate",
- "AccountMoid": "5ed10e437564612d3352cc2d",
- "CreateTime": "2022-10-12T16:53:46.348Z",
- "DomainGroupMoid": "5ed10e437564612d3352cc37",
- "ModTime": "2022-11-29T12:32:37.902Z",
- "Moid": "6346f11a77696e2d300b6049",
- "Owners": [
- "5ed10e437564612d3352cc2d"
- ],
- "SharedScope": "",
- "Tags": [
+ {
+ "ClassId": "server.ProfileTemplate",
+ "ObjectType": "server.ProfileTemplate",
+ "AccountMoid": "5ed10e437564612d3352cc2d",
+ "CreateTime": "2022-10-12T16:53:46.348Z",
+ "DomainGroupMoid": "5ed10e437564612d3352cc37",
+ "ModTime": "2022-11-29T12:32:37.902Z",
+ "Moid": "6346f11a77696e2d300b6049",
+ "Owners": [
+ "5ed10e437564612d3352cc2d"
+ ],
+ "SharedScope": "",
+ "Tags": [
- ],
- "VersionContext": null,
- "Ancestors": [
+ ],
+ "VersionContext": null,
+ "Ancestors": [
- ],
- "PermissionResources": [
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "organization.Organization",
- "Moid": "631803456972652d3097eb8d",
- "link": "https://www.intersight.com/api/v1/organization/Organizations/631803456972652d3097eb8d"
- }
- ],
- "DisplayNames": null,
- "Description": "",
- "Name": "xLabs-Development",
- "Type": "instance",
- "Action": "No-op",
- "ConfigContext": {
- "ClassId": "policy.ConfigContext",
- "ObjectType": "policy.ConfigContext",
- "ConfigState": "",
- "ConfigType": "",
- "ControlAction": "ConfigChange",
- "ErrorState": "",
- "OperState": ""
- },
- "PolicyBucket": [
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "bios.Policy",
- "Moid": "6346f13e6275722d30ed4a0e",
- "link": "https://www.intersight.com/api/v1/bios/Policies/6346f13e6275722d30ed4a0e"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "access.Policy",
- "Moid": "6346f21c6275722d30ed6144",
- "link": "https://www.intersight.com/api/v1/access/Policies/6346f21c6275722d30ed6144"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "ipmioverlan.Policy",
- "Moid": "6346f2356275722d30ed63d9",
- "link": "https://www.intersight.com/api/v1/ipmioverlan/Policies/6346f2356275722d30ed63d9"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "iam.EndPointUserPolicy",
- "Moid": "6346f26b6275722d30ed691f",
- "link": "https://www.intersight.com/api/v1/iam/EndPointUserPolicies/6346f26b6275722d30ed691f"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "kvm.Policy",
- "Moid": "6347308a6275722d30f410e2",
- "link": "https://www.intersight.com/api/v1/kvm/Policies/6347308a6275722d30f410e2"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "boot.PrecisionPolicy",
- "Moid": "6346f1b26275722d30ed5613",
- "link": "https://www.intersight.com/api/v1/boot/PrecisionPolicies/6346f1b26275722d30ed5613"
- },
- {
- "ClassId": "mo.MoRef",
- "ObjectType": "vnic.LanConnectivityPolicy",
- "Moid": "634846a5ea6a1292fc328d82",
- "link": "https://www.intersight.com/api/v1/vnic/LanConnectivityPolicies/634846a5ea6a1292fc328d82"
- }
- ],
- "TargetPlatform": "FIAttached",
- "UuidAddressType": "NONE",
- "Usage": 1,
- "Organization": {
- "ClassId": "mo.MoRef",
- "ObjectType": "organization.Organization",
- "Moid": "631803456972652d3097eb8d",
- "link": "https://www.intersight.com/api/v1/organization/Organizations/631803456972652d3097eb8d"
- }
- }
- ]
+ ],
+ "PermissionResources": [
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "organization.Organization",
+ "Moid": "631803456972652d3097eb8d",
+ "link": "https://www.intersight.com/api/v1/organization/Organizations/631803456972652d3097eb8d"
+ }
+ ],
+ "DisplayNames": null,
+ "Description": "",
+ "Name": "xLabs-Development",
+ "Type": "instance",
+ "Action": "No-op",
+ "ConfigContext": {
+ "ClassId": "policy.ConfigContext",
+ "ObjectType": "policy.ConfigContext",
+ "ConfigState": "",
+ "ConfigType": "",
+ "ControlAction": "ConfigChange",
+ "ErrorState": "",
+ "OperState": ""
+ },
+ "PolicyBucket": [
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "bios.Policy",
+ "Moid": "6346f13e6275722d30ed4a0e",
+ "link": "https://www.intersight.com/api/v1/bios/Policies/6346f13e6275722d30ed4a0e"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "access.Policy",
+ "Moid": "6346f21c6275722d30ed6144",
+ "link": "https://www.intersight.com/api/v1/access/Policies/6346f21c6275722d30ed6144"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "ipmioverlan.Policy",
+ "Moid": "6346f2356275722d30ed63d9",
+ "link": "https://www.intersight.com/api/v1/ipmioverlan/Policies/6346f2356275722d30ed63d9"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "iam.EndPointUserPolicy",
+ "Moid": "6346f26b6275722d30ed691f",
+ "link": "https://www.intersight.com/api/v1/iam/EndPointUserPolicies/6346f26b6275722d30ed691f"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "kvm.Policy",
+ "Moid": "6347308a6275722d30f410e2",
+ "link": "https://www.intersight.com/api/v1/kvm/Policies/6347308a6275722d30f410e2"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "boot.PrecisionPolicy",
+ "Moid": "6346f1b26275722d30ed5613",
+ "link": "https://www.intersight.com/api/v1/boot/PrecisionPolicies/6346f1b26275722d30ed5613"
+ },
+ {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "vnic.LanConnectivityPolicy",
+ "Moid": "634846a5ea6a1292fc328d82",
+ "link": "https://www.intersight.com/api/v1/vnic/LanConnectivityPolicies/634846a5ea6a1292fc328d82"
+ }
+ ],
+ "TargetPlatform": "FIAttached",
+ "UuidAddressType": "NONE",
+ "Usage": 1,
+ "Organization": {
+ "ClassId": "mo.MoRef",
+ "ObjectType": "organization.Organization",
+ "Moid": "631803456972652d3097eb8d",
+ "link": "https://www.intersight.com/api/v1/organization/Organizations/631803456972652d3097eb8d"
+ }
+ }
+ ]
}
http_version:
recorded_at: Thu, 12 May 2022 13:46:56 GMT
Here are my local changes to get this green. I'm not sure what editor you're using but the indentation on the YAML is way off
@agrare how can I run only the spec of the cisco provider?
@eilam20 if you are in the manageiq-providers-cisco_intersight
repo then bundle exec rake
will only run those specs.
@agrare I see that the tests ran successfully, so it can be merged?
woohoo :tada:
Add the physical_server_profile_templates to Physical Infra Manager.