Closed pksorensen closed 10 years ago
@singhkay Please triage
@s093294 If I understand this correctly, you are unable to update the value of an extended property by using a label or description that you used previously ?
Ye, long time ago, so have not tested it since. But the problem was that using the same two descriptions and labels, the update failed, and to update the property bag, i had to alter one of them.
@s093294 Thanks, we'll triage this @huangpf
The following test cases passed for me:
compute.HostedServices.Create(
new HostedServiceCreateParameters
{
Location = location,
Label = serviceDescription,
Description = serviceLabel,
ServiceName = serviceName,
ExtendedProperties = new Dictionary<string, string>
{
{ "foo1", "bar" },
{ "foo2", "baz" }
}
});
compute.HostedServices.Update(
serviceName,
new HostedServiceUpdateParameters
{
Label = serviceDescription,
Description = serviceLabel,
ExtendedProperties = new Dictionary<string, string>
{
{ "bar", "foo3" },
{ "baz", "foo4" }
}
});
compute.HostedServices.Update(
serviceName,
new HostedServiceUpdateParameters
{
Label = serviceDescription,
ExtendedProperties = new Dictionary<string, string>
{
{ "bar", "foo5" },
{ "baz", "foo6" }
}
});
compute.HostedServices.Update(
serviceName,
new HostedServiceUpdateParameters
{
Description = serviceLabel,
ExtendedProperties = new Dictionary<string, string>
{
{ "bar", "foo7" },
{ "baz", "foo8" }
}
});
compute.HostedServices.Update(
serviceName,
new HostedServiceUpdateParameters
{
ExtendedProperties = new Dictionary<string, string>
{
{ "bar", "foo9" },
{ "baz", "foo10" }
}
});
compute.HostedServices.Update(
serviceName,
new HostedServiceUpdateParameters
{
Label = serviceLabel,
Description = serviceDescription,
ExtendedProperties = new Dictionary<string, string>
{
{ "bar", "foo1" },
{ "baz", "foo2" }
}
});
@s093294 Please try use the latest library to see whether it's working for you. If not please include more details about the client exception and debug logs for all the service calls.
https://www.nuget.org/packages/Microsoft.WindowsAzure.Management.Compute
Thanks.
Thanks. I will verify in the coming week. but looks fine from your tests.
Closing. Please reopen if the problem is not fixed.
Was trying to use the Extended Properties for storing meta data about some auto deployed cloud services but failed at updating the Extended Properties in the following matter. service.Properties.ExtendedProperties are manipulated before trying to update.
Problem is that Label or Description needs to be given, but if its not changed from before then the request fails.
I am wondering more what the intention of extended properties are if they are not updatable? (Reading the rest api documentation it do not see to be a bug in WAML but rather a by design type of situation, I am just not sure why the design is like this.)
compute.HostedServices.Update(service.ServiceName, new HostedServiceUpdateParameters { ExtendedProperties = service.Properties.ExtendedProperties, Label = service.Properties.Label, Description = service.Properties.Description, });
https://github.com/Azure/azure-sdk-for-net/issues/401