import java.net.HttpURLConnection;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
/**
* Neutron Northbound REST APIs for Security Rule.<br>
* This class provides REST APIs for managing neutron Security Rule
+ *
* <p>
* <br>
* <br>
}
/**
- * Returns a list of all Security Rules
+ * Returns a list of all Security Rules.
*/
@GET
@Produces({ MediaType.APPLICATION_JSON })
INeutronSecurityRuleCRUD securityRuleInterface = getNeutronCRUD();
List<NeutronSecurityRule> allSecurityRules = securityRuleInterface.getAll();
List<NeutronSecurityRule> ans = new ArrayList<>();
- Iterator<NeutronSecurityRule> i = allSecurityRules.iterator();
- while (i.hasNext()) {
- NeutronSecurityRule nsr = i.next();
+ for (NeutronSecurityRule nsr : allSecurityRules) {
if ((querySecurityRuleUUID == null || querySecurityRuleUUID.equals(nsr.getID()))
&& (querySecurityRuleDirection == null
|| querySecurityRuleDirection.equals(nsr.getSecurityRuleDirection()))
}
/**
- * Returns a specific Security Rule
+ * Returns a specific Security Rule.
*/
@Path("{securityRuleUUID}")
}
/**
- * Creates new Security Rule
+ * Creates new Security Rule.
*/
@POST
}
/**
- * Updates a Security Rule
+ * Updates a Security Rule.
*/
@Path("{securityRuleUUID}")
}
/**
- * Deletes a Security Rule
+ * Deletes a Security Rule.
*/
@Path("{securityRuleUUID}")