On running  run /opt/puppetlabs/bin/puppet agent --test on my node I get the above error. as shown:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Error while evaluating a Resource Statement. Could not find declared class firewall at /etc/puppetlabs/code/environments/production/manifests/site.pp:7:1 on node mark-inspiron.
I have written a firewall module. the file section works but bot the firewall. Can somebody please help?
Here's my site.pp
file {'/tmp/it_works.txt':                        # resource type file and filename
  ensure  => present,                             # make sure it exists
  mode    => '0644',                              # file permissions
  content => "It works on ${ipaddress_eth0}!\n",  # Print the eth0 IP fact
}
class { 'firewall': }
resources { 'firewall':
    purge => true,
}
firewall { "051 asterisk-set-rate-limit-register":
    string      => "REGISTER sip:",
    string_algo => "bm",
    dport       => '5060',
    proto       => 'udp',
    recent      => 'set',
    rname       => 'VOIPREGISTER',
    rsource     => 'true';
}
firewall { "052 asterisk-drop-rate-limit-register":
    string      => "REGISTER sip:",
    string_algo => "bm",
    dport       => '5060',
    proto       => 'udp',
    action      => 'drop',
    recent      => 'update',
    rseconds    => '600',
    rhitcount   => '5',
    rname       => 'VOIPREGISTER',
    rsource     => true,
    rttl        => true;
}