Github user jburwell commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1545#discussion_r74250260
  
    --- Diff: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 
---
    @@ -1209,25 +1209,95 @@ public String toString() {
             }
         }
     
    -    public static class VirtioSerialDef {
    -        private final String _name;
    -        private String _path;
    +    public static class ChannelDef {
    +        enum ChannelType {
    +            UNIX("unix"), SERIAL("serial");
    +            String type;
     
    -        public VirtioSerialDef(String name, String path) {
    -            _name = name;
    -            _path = path;
    +            ChannelType(String type) {
    +                this.type = type;
    +            }
    +
    +            @Override
    +            public String toString() {
    +                return this.type;
    +            }
    +        }
    +
    +        enum ChannelState {
    +            DISCONNECTED("disconnected"), CONNECTED("connected");
    +            String type;
    +
    +            ChannelState(String type) {
    +                this.type = type;
    +            }
    +
    +            @Override
    +            public String toString() {
    +                return type;
    +            }
    +        }
    +
    +        private String name;
    +        private String path;
    +        private ChannelType type;
    +        private ChannelState state;
    +
    +        public ChannelDef(String name, ChannelType type) {
    +            this.name = name;
    +            this.type = type;
    --- End diff --
    
    Why not delegate to ``this(String name, ChannelType type, ChannelState 
state, String path)``?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to