Re: JuniperSRX firewall configure plugin source bug

2016-08-24 Thread Gust

I submitted PR:

https://github.com/apache/cloudstack/pull/1662


> 在 2016年8月24日,20:36,Will Stevens  写道:
> 
> Hey Gust,
> Here are the details for contributing.
> 
> https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md
> 
> You need to fork cloudstack and the the change in your fork. Then you
> create a pull request from your fork to ACS.
> 
> Let us know if you have problems following that guide.
> 
> Cheers,
> 
> Will
> 
> On Aug 24, 2016 4:09 AM, "Gust"  wrote:
> 
>> 
>> Hi, Jayapal
>> 
>> why not submit a PR, in github desktop prompt:
>> 
>> You may not have permission to access cloudstack. Check Preferences to
>> make sure you’re still logged in.
>> 
>> I ensure i loved in.
>> 
>> 
>> 
>>> 在 2016年8月24日,12:52,Jayapal Uradi  jayapal.ur...@accelerite.com>> 写道:
>>> 
>>> Hi Gust,
>>> 
>>> The changes look good  please go head and raise a PR for it.
>>> 
>>> Thanks,
>>> Jayapal
 On Aug 24, 2016, at 8:14 AM, Gust  digitalg...@163.com>> wrote:
 
 Hi , all
 
 There is a bug in com.cloud.network.resource.JuniperSrxResource
 
 It will report syntax error when configure  outgress rule to Juniper
>> srx hardware firewall.
 
 
 begin line 2830 :
 
if (type.equals(SecurityPolicyType.
>> SECURITYPOLICY_EGRESS_DEFAULT)) {
if (defaultEgressAction == false) {
//for default policy is false add default
>> deny rules
action = "";
} else {
action = "";
}
 
} else {
if (defaultEgressAction == true) {
//configure egress rules to deny the traffic
>> when default egress is allow
action = "";
} else {
action = "";
}
 //error here
xml = replaceXmlValue(xml, "action", action);
 
}
 
 fix:
 
if (type.equals(SecurityPolicyType.
>> SECURITYPOLICY_EGRESS_DEFAULT)) {
if (defaultEgressAction == false) {
//for default policy is false add default
>> deny rules
action = "";
} else {
action = "";
}
 
} else {
if (defaultEgressAction == true) {
//configure egress rules to deny the traffic
>> when default egress is allow
action = "";
} else {
action = "";
}
}
 //move replace  out
xml = replaceXmlValue(xml, "action", action);
 
 
 
 gust
 
 Being china.
 2016-08-24
 
 
 
 
>>> 
>>> 
>>> 
>>> 
>>> DISCLAIMER
>>> ==
>>> This e-mail may contain privileged and confidential information which is
>> the property of Accelerite, a Persistent Systems business. It is intended
>> only for the use of the individual or entity to which it is addressed. If
>> you are not the intended recipient, you are not authorized to read, retain,
>> copy, print, distribute or use this message. If you have received this
>> communication in error, please notify the sender and delete all copies of
>> this message. Accelerite, a Persistent Systems business does not accept any
>> liability for virus infected mails.
>> 
>> 




Re: JuniperSRX firewall configure plugin source bug

2016-08-24 Thread Will Stevens
Hey Gust,
Here are the details for contributing.

https://github.com/apache/cloudstack/blob/master/CONTRIBUTING.md

You need to fork cloudstack and the the change in your fork. Then you
create a pull request from your fork to ACS.

Let us know if you have problems following that guide.

Cheers,

Will

On Aug 24, 2016 4:09 AM, "Gust"  wrote:

>
> Hi, Jayapal
>
> why not submit a PR, in github desktop prompt:
>
> You may not have permission to access cloudstack. Check Preferences to
> make sure you’re still logged in.
>
> I ensure i loved in.
>
>
>
> > 在 2016年8月24日,12:52,Jayapal Uradi > 写道:
> >
> > Hi Gust,
> >
> > The changes look good  please go head and raise a PR for it.
> >
> > Thanks,
> > Jayapal
> >> On Aug 24, 2016, at 8:14 AM, Gust > wrote:
> >>
> >> Hi , all
> >>
> >> There is a bug in com.cloud.network.resource.JuniperSrxResource
> >>
> >> It will report syntax error when configure  outgress rule to Juniper
> srx hardware firewall.
> >>
> >>
> >> begin line 2830 :
> >>
> >>   if (type.equals(SecurityPolicyType.
> SECURITYPOLICY_EGRESS_DEFAULT)) {
> >>   if (defaultEgressAction == false) {
> >>   //for default policy is false add default
> deny rules
> >>   action = "";
> >>   } else {
> >>   action = "";
> >>   }
> >>
> >>   } else {
> >>   if (defaultEgressAction == true) {
> >>   //configure egress rules to deny the traffic
> when default egress is allow
> >>   action = "";
> >>   } else {
> >>   action = "";
> >>   }
> >> //error here
> >>   xml = replaceXmlValue(xml, "action", action);
> >>
> >>   }
> >>
> >> fix:
> >>
> >>   if (type.equals(SecurityPolicyType.
> SECURITYPOLICY_EGRESS_DEFAULT)) {
> >>   if (defaultEgressAction == false) {
> >>   //for default policy is false add default
> deny rules
> >>   action = "";
> >>   } else {
> >>   action = "";
> >>   }
> >>
> >>   } else {
> >>   if (defaultEgressAction == true) {
> >>   //configure egress rules to deny the traffic
> when default egress is allow
> >>   action = "";
> >>   } else {
> >>   action = "";
> >>   }
> >>   }
> >> //move replace  out
> >>   xml = replaceXmlValue(xml, "action", action);
> >>
> >>
> >>
> >> gust
> >>
> >> Being china.
> >> 2016-08-24
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> > DISCLAIMER
> > ==
> > This e-mail may contain privileged and confidential information which is
> the property of Accelerite, a Persistent Systems business. It is intended
> only for the use of the individual or entity to which it is addressed. If
> you are not the intended recipient, you are not authorized to read, retain,
> copy, print, distribute or use this message. If you have received this
> communication in error, please notify the sender and delete all copies of
> this message. Accelerite, a Persistent Systems business does not accept any
> liability for virus infected mails.
>
>


Re: JuniperSRX firewall configure plugin source bug

2016-08-24 Thread Gust

Hi, Jayapal 

why not submit a PR, in github desktop prompt:

You may not have permission to access cloudstack. Check Preferences to make 
sure you’re still logged in.

I ensure i loved in.



> 在 2016年8月24日,12:52,Jayapal Uradi  > 写道:
> 
> Hi Gust,
> 
> The changes look good  please go head and raise a PR for it.
> 
> Thanks,
> Jayapal
>> On Aug 24, 2016, at 8:14 AM, Gust > > wrote:
>> 
>> Hi , all
>> 
>> There is a bug in com.cloud.network.resource.JuniperSrxResource
>> 
>> It will report syntax error when configure  outgress rule to Juniper srx 
>> hardware firewall.
>> 
>> 
>> begin line 2830 :
>> 
>>   if 
>> (type.equals(SecurityPolicyType.SECURITYPOLICY_EGRESS_DEFAULT)) {
>>   if (defaultEgressAction == false) {
>>   //for default policy is false add default deny 
>> rules
>>   action = "";
>>   } else {
>>   action = "";
>>   }
>> 
>>   } else {
>>   if (defaultEgressAction == true) {
>>   //configure egress rules to deny the traffic when 
>> default egress is allow
>>   action = "";
>>   } else {
>>   action = "";
>>   }
>> //error here
>>   xml = replaceXmlValue(xml, "action", action);
>> 
>>   }
>> 
>> fix:
>> 
>>   if 
>> (type.equals(SecurityPolicyType.SECURITYPOLICY_EGRESS_DEFAULT)) {
>>   if (defaultEgressAction == false) {
>>   //for default policy is false add default deny 
>> rules
>>   action = "";
>>   } else {
>>   action = "";
>>   }
>> 
>>   } else {
>>   if (defaultEgressAction == true) {
>>   //configure egress rules to deny the traffic when 
>> default egress is allow
>>   action = "";
>>   } else {
>>   action = "";
>>   }
>>   }
>> //move replace  out
>>   xml = replaceXmlValue(xml, "action", action);
>> 
>> 
>> 
>> gust
>> 
>> Being china.
>> 2016-08-24
>> 
>> 
>> 
>> 
> 
> 
> 
> 
> DISCLAIMER
> ==
> This e-mail may contain privileged and confidential information which is the 
> property of Accelerite, a Persistent Systems business. It is intended only 
> for the use of the individual or entity to which it is addressed. If you are 
> not the intended recipient, you are not authorized to read, retain, copy, 
> print, distribute or use this message. If you have received this 
> communication in error, please notify the sender and delete all copies of 
> this message. Accelerite, a Persistent Systems business does not accept any 
> liability for virus infected mails.



Re: JuniperSRX firewall configure plugin source bug

2016-08-23 Thread Jayapal Uradi
Hi Gust,

The changes look good  please go head and raise a PR for it.

Thanks,
Jayapal
> On Aug 24, 2016, at 8:14 AM, Gust  wrote:
>
> Hi , all
>
> There is a bug in com.cloud.network.resource.JuniperSrxResource
>
> It will report syntax error when configure  outgress rule to Juniper srx 
> hardware firewall.
>
>
> begin line 2830 :
>
>if 
> (type.equals(SecurityPolicyType.SECURITYPOLICY_EGRESS_DEFAULT)) {
>if (defaultEgressAction == false) {
>//for default policy is false add default deny 
> rules
>action = "";
>} else {
>action = "";
>}
>
>} else {
>if (defaultEgressAction == true) {
>//configure egress rules to deny the traffic when 
> default egress is allow
>action = "";
>} else {
>action = "";
>}
> //error here
>xml = replaceXmlValue(xml, "action", action);
>
>}
>
> fix:
>
>if 
> (type.equals(SecurityPolicyType.SECURITYPOLICY_EGRESS_DEFAULT)) {
>if (defaultEgressAction == false) {
>//for default policy is false add default deny 
> rules
>action = "";
>} else {
>action = "";
>}
>
>} else {
>if (defaultEgressAction == true) {
>//configure egress rules to deny the traffic when 
> default egress is allow
>action = "";
>} else {
>action = "";
>}
>}
> //move replace  out
>xml = replaceXmlValue(xml, "action", action);
>
>
>
> gust
>
> Being china.
> 2016-08-24
>
>
>
>




DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Accelerite, a Persistent Systems business. It is intended only for 
the use of the individual or entity to which it is addressed. If you are not 
the intended recipient, you are not authorized to read, retain, copy, print, 
distribute or use this message. If you have received this communication in 
error, please notify the sender and delete all copies of this message. 
Accelerite, a Persistent Systems business does not accept any liability for 
virus infected mails.


JuniperSRX firewall configure plugin source bug

2016-08-23 Thread Gust
Hi , all

There is a bug in com.cloud.network.resource.JuniperSrxResource

It will report syntax error when configure  outgress rule to Juniper srx 
hardware firewall.


begin line 2830 :

if 
(type.equals(SecurityPolicyType.SECURITYPOLICY_EGRESS_DEFAULT)) {
if (defaultEgressAction == false) {
//for default policy is false add default deny rules
action = "";
} else {
action = "";
}

} else {
if (defaultEgressAction == true) {
//configure egress rules to deny the traffic when 
default egress is allow
action = "";
} else {
action = "";
}
//error here
xml = replaceXmlValue(xml, "action", action);

}

fix:

if 
(type.equals(SecurityPolicyType.SECURITYPOLICY_EGRESS_DEFAULT)) {
if (defaultEgressAction == false) {
//for default policy is false add default deny rules
action = "";
} else {
action = "";
}

} else {
if (defaultEgressAction == true) {
//configure egress rules to deny the traffic when 
default egress is allow
action = "";
} else {
action = "";
}
}
//move replace  out
xml = replaceXmlValue(xml, "action", action);



gust 

Being china.
2016-08-24