code: @Override
      public @Nonnull Iterable<IpForwardingRule> listRulesForServer(@Nonnull String serverId) throws InternalException, CloudException {
          if(serverId == null)
              throw new InternalException("Parameter serverId cannot be null");
  
          PersistentVMRoleModel persistentVMRoleModel = getVMRole(serverId);
          if(persistentVMRoleModel == null)
              throw new InternalException("Cannot find Azure virtual machine with id: " + serverId);
  
          ArrayList<IpForwardingRule> rules = new ArrayList<IpForwardingRule>();
  
          if(persistentVMRoleModel.getConfigurationSets().get(0).getInputEndpoints() != null)
          {
              for (PersistentVMRoleModel.InputEndpoint endpoint : persistentVMRoleModel.getConfigurationSets().get(0).getInputEndpoints())
              {
                  IpForwardingRule rule = new IpForwardingRule();
                  rule.setProviderRuleId(new AzureRuleIdParts(serverId, endpoint.getProtocol(), endpoint.getLocalPort()).toProviderId());
                  rule.setPublicPort(Integer.parseInt(endpoint.getPort()));
                  rule.setPrivatePort(Integer.parseInt(endpoint.getLocalPort()));
                  rule.setServerId(serverId);
                  rule.setProtocol(Protocol.valueOf(endpoint.getProtocol().toUpperCase()));
                  rules.add(rule);
              }
          }
  
          return rules;
      }
docs: Lists the IP forwarding rules associated with the specified public IP address. This method
  is safe to call even when requested on a private IP address or when IP forwarding is not supported.
  In those situations, {@link java.util.Collections#emptyList()} will be returned.
  
  @param serverId the unique ID of the virtual machine whose forwarding rules will be sought
  @return all IP forwarding rules for the specified IP address
  @throws org.dasein.cloud.InternalException an internal error occurred inside the Dasein Cloud implementation
  @throws org.dasein.cloud.CloudException    an error occurred processing the request in the cloud