code: def generate_csr(self, csr_data, bay_number=None):
          
          uri = "{}/https/certificaterequest".format(self.data['uri'])
  
          if bay_number:
              uri += "?bayNumber=%d" % (bay_number)
  
          headers = {'Content-Type': 'application/json'}
  
          return self._helper.do_post(uri, csr_data, -1, headers)
docs: Creates a Certificate Signing Request (CSR) for an enclosure.
  
          Args:
              csr_data: Dictionary with csr details.
              bay_number: OA from which the CSR should be generated.
  
          Returns:
              Enclosure.