Re: [libvirt] [PATCH go-xml] fix type tag for rdp and destkop graphics devices
Thanks, I've pushed this to git now On Sat, Mar 10, 2018 at 06:46:30PM -0500, Ryan Goodfellow wrote: > Signed-off-by: Ryan Goodfellow> > On Mon, Mar 5, 2018 at 4:25 AM, Daniel P. Berrangé > wrote: > > > On Sun, Mar 04, 2018 at 10:41:43AM -0500, Ryan Goodfellow wrote: > > > The current behavior is to generate a type="vnc" tag in the > > > element generated from either a DomainGrapicRDP or DomainGraphicDesktop. > > > The correct tags should be type="rdp" and type="desktop" respectively. > > > This commit emits the correct tags and adds a test for correct graphics > > > device tagging. > > > > The patch looks good, but we recently started to require all contributors > > to indicate their compliance with the DCO > > > > https://developercertificate.org/ > > > > you can do this by simply by adding 'Signed-off-by: Your Name > >' > > in commit message for patches you submit - in this case no need to > > re-submit > > the patch - just reply to my email here with a Signed-off-by under your > > name > > and then I'll merge it. > > > > > --- > > > domain.go | 4 ++-- > > > domain_test.go | 26 ++ > > > 2 files changed, 28 insertions(+), 2 deletions(-) > > > > > > diff --git a/domain.go b/domain.go > > > index ea53dfc..1de4ade 100644 > > > --- a/domain.go > > > +++ b/domain.go > > > @@ -4226,12 +4226,12 @@ func (a *DomainGraphic) MarshalXML(e > > *xml.Encoder, start xml.StartElement) error > > > return e.EncodeElement(a.VNC, start) > > > } else if a.RDP != nil { > > > start.Attr = append(start.Attr, xml.Attr{ > > > - xml.Name{Local: "type"}, "vnc", > > > + xml.Name{Local: "type"}, "rdp", > > > }) > > > return e.EncodeElement(a.RDP, start) > > > } else if a.Desktop != nil { > > > start.Attr = append(start.Attr, xml.Attr{ > > > - xml.Name{Local: "type"}, "vnc", > > > + xml.Name{Local: "type"}, "desktop", > > > }) > > > return e.EncodeElement(a.Desktop, start) > > > } else if a.Spice != nil { > > > diff --git a/domain_test.go b/domain_test.go > > > index 7c9d3a2..1715e01 100644 > > > --- a/domain_test.go > > > +++ b/domain_test.go > > > @@ -3782,6 +3782,32 @@ var domainTestData = []struct { > > > ``, > > > }, > > > }, > > > + { > > > + Object: { > > > + Name: "demo", > > > + Devices: { > > > + Graphics: []DomainGraphic{ > > > + DomainGraphic{SDL: > > {}}, > > > + DomainGraphic{VNC: > > {}}, > > > + DomainGraphic{RDP: > > {}}, > > > + DomainGraphic{Desktop: > > {}}, > > > + DomainGraphic{Spice: > > {}}, > > > + }, > > > + }, > > > + }, > > > + Expected: []string{ > > > + ``, > > > + ` demo`, > > > + ` `, > > > + ``, > > > + ``, > > > + ``, > > > + ``, > > > + ``, > > > + ` `, > > > + ``, > > > + }, > > > + }, > > > } > > > > > > func TestDomain(t *testing.T) { > > > -- > > > 2.14.3 > > > > > > -- > > > libvir-list mailing list > > > libvir-list@redhat.com > > > https://www.redhat.com/mailman/listinfo/libvir-list > > > > Regards, > > Daniel > > -- > > |: https://berrange.com -o-https://www.flickr.com/photos/ > > dberrange :| > > |: https://libvirt.org -o- > > https://fstop138.berrange.com :| > > |: https://entangle-photo.org-o-https://www.instagram.com/ > > dberrange :| > > > > -- > > libvir-list mailing list > > libvir-list@redhat.com > > https://www.redhat.com/mailman/listinfo/libvir-list > > > > > > -- > *ry**@isi* Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH go-xml] fix type tag for rdp and destkop graphics devices
Signed-off-by: Ryan GoodfellowOn Mon, Mar 5, 2018 at 4:25 AM, Daniel P. Berrangé wrote: > On Sun, Mar 04, 2018 at 10:41:43AM -0500, Ryan Goodfellow wrote: > > The current behavior is to generate a type="vnc" tag in the > > element generated from either a DomainGrapicRDP or DomainGraphicDesktop. > > The correct tags should be type="rdp" and type="desktop" respectively. > > This commit emits the correct tags and adds a test for correct graphics > > device tagging. > > The patch looks good, but we recently started to require all contributors > to indicate their compliance with the DCO > > https://developercertificate.org/ > > you can do this by simply by adding 'Signed-off-by: Your Name >' > in commit message for patches you submit - in this case no need to > re-submit > the patch - just reply to my email here with a Signed-off-by under your > name > and then I'll merge it. > > > --- > > domain.go | 4 ++-- > > domain_test.go | 26 ++ > > 2 files changed, 28 insertions(+), 2 deletions(-) > > > > diff --git a/domain.go b/domain.go > > index ea53dfc..1de4ade 100644 > > --- a/domain.go > > +++ b/domain.go > > @@ -4226,12 +4226,12 @@ func (a *DomainGraphic) MarshalXML(e > *xml.Encoder, start xml.StartElement) error > > return e.EncodeElement(a.VNC, start) > > } else if a.RDP != nil { > > start.Attr = append(start.Attr, xml.Attr{ > > - xml.Name{Local: "type"}, "vnc", > > + xml.Name{Local: "type"}, "rdp", > > }) > > return e.EncodeElement(a.RDP, start) > > } else if a.Desktop != nil { > > start.Attr = append(start.Attr, xml.Attr{ > > - xml.Name{Local: "type"}, "vnc", > > + xml.Name{Local: "type"}, "desktop", > > }) > > return e.EncodeElement(a.Desktop, start) > > } else if a.Spice != nil { > > diff --git a/domain_test.go b/domain_test.go > > index 7c9d3a2..1715e01 100644 > > --- a/domain_test.go > > +++ b/domain_test.go > > @@ -3782,6 +3782,32 @@ var domainTestData = []struct { > > ``, > > }, > > }, > > + { > > + Object: { > > + Name: "demo", > > + Devices: { > > + Graphics: []DomainGraphic{ > > + DomainGraphic{SDL: > {}}, > > + DomainGraphic{VNC: > {}}, > > + DomainGraphic{RDP: > {}}, > > + DomainGraphic{Desktop: > {}}, > > + DomainGraphic{Spice: > {}}, > > + }, > > + }, > > + }, > > + Expected: []string{ > > + ``, > > + ` demo`, > > + ` `, > > + ``, > > + ``, > > + ``, > > + ``, > > + ``, > > + ` `, > > + ``, > > + }, > > + }, > > } > > > > func TestDomain(t *testing.T) { > > -- > > 2.14.3 > > > > -- > > libvir-list mailing list > > libvir-list@redhat.com > > https://www.redhat.com/mailman/listinfo/libvir-list > > Regards, > Daniel > -- > |: https://berrange.com -o-https://www.flickr.com/photos/ > dberrange :| > |: https://libvirt.org -o- > https://fstop138.berrange.com :| > |: https://entangle-photo.org-o-https://www.instagram.com/ > dberrange :| > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list > -- *ry**@isi* -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH go-xml] fix type tag for rdp and destkop graphics devices
On Sun, Mar 04, 2018 at 10:41:43AM -0500, Ryan Goodfellow wrote: > The current behavior is to generate a type="vnc" tag in the > element generated from either a DomainGrapicRDP or DomainGraphicDesktop. > The correct tags should be type="rdp" and type="desktop" respectively. > This commit emits the correct tags and adds a test for correct graphics > device tagging. The patch looks good, but we recently started to require all contributors to indicate their compliance with the DCO https://developercertificate.org/ you can do this by simply by adding 'Signed-off-by: Your Name' in commit message for patches you submit - in this case no need to re-submit the patch - just reply to my email here with a Signed-off-by under your name and then I'll merge it. > --- > domain.go | 4 ++-- > domain_test.go | 26 ++ > 2 files changed, 28 insertions(+), 2 deletions(-) > > diff --git a/domain.go b/domain.go > index ea53dfc..1de4ade 100644 > --- a/domain.go > +++ b/domain.go > @@ -4226,12 +4226,12 @@ func (a *DomainGraphic) MarshalXML(e *xml.Encoder, > start xml.StartElement) error > return e.EncodeElement(a.VNC, start) > } else if a.RDP != nil { > start.Attr = append(start.Attr, xml.Attr{ > - xml.Name{Local: "type"}, "vnc", > + xml.Name{Local: "type"}, "rdp", > }) > return e.EncodeElement(a.RDP, start) > } else if a.Desktop != nil { > start.Attr = append(start.Attr, xml.Attr{ > - xml.Name{Local: "type"}, "vnc", > + xml.Name{Local: "type"}, "desktop", > }) > return e.EncodeElement(a.Desktop, start) > } else if a.Spice != nil { > diff --git a/domain_test.go b/domain_test.go > index 7c9d3a2..1715e01 100644 > --- a/domain_test.go > +++ b/domain_test.go > @@ -3782,6 +3782,32 @@ var domainTestData = []struct { > ``, > }, > }, > + { > + Object: { > + Name: "demo", > + Devices: { > + Graphics: []DomainGraphic{ > + DomainGraphic{SDL: {}}, > + DomainGraphic{VNC: {}}, > + DomainGraphic{RDP: {}}, > + DomainGraphic{Desktop: > {}}, > + DomainGraphic{Spice: > {}}, > + }, > + }, > + }, > + Expected: []string{ > + ``, > + ` demo`, > + ` `, > + ``, > + ``, > + ``, > + ``, > + ``, > + ` `, > + ``, > + }, > + }, > } > > func TestDomain(t *testing.T) { > -- > 2.14.3 > > -- > libvir-list mailing list > libvir-list@redhat.com > https://www.redhat.com/mailman/listinfo/libvir-list Regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://entangle-photo.org-o-https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list