import * as React from 'react';

import { FormContainer, SelectField, NumberField } from '@waldur/form-react';
import { translate } from '@waldur/i18n';

export const OpenStackPluginOptionsForm = ({ container }) => {
  const STORAGE_MODE_OPTIONS = React.useMemo(
    () => [
      {
        label: translate('Fixed — use common storage quota'),
        value: 'fixed',
      },
      {
        label: translate(
          'Dynamic — use separate volume types for tracking pricing',
        ),
        value: 'dynamic',
      },
    ],
    [],
  );

  return (
    <FormContainer {...container}>
      <SelectField
        name="storage_mode"
        label={translate('Storage mode')}
        options={STORAGE_MODE_OPTIONS}
        simpleValue={true}
        required={true}
        description={translate(
          'Offering needs to be saved before pricing for dynamic components could be set.',
        )}
      />
      <NumberField
        name="snapshot_size_limit_gb"
        label={translate('Snapshot size limit')}
        unit="GB"
      />
    </FormContainer>
  );
};

import * as React from 'react';

import { FormContainer, SelectField } from '@waldur/form-react';
import { translate } from '@waldur/i18n';

export const OpenStackPluginOptionsForm = ({ container, locale }) => {
  const STORAGE_MODE_OPTIONS = React.useMemo(
    () => [
      {
        label: translate('Fixed — use common storage quota'),
        value: 'fixed',
      },
      {
        label: translate(
          'Dynamic — use separate volume types for tracking pricing',
        ),
        value: 'dynamic',
      },
    ],
    locale,
  );

  return (
    <FormContainer {...container}>
      <SelectField
        name="storage_mode"
        label={translate('Storage mode')}
        options={STORAGE_MODE_OPTIONS}
        simpleValue={true}
        required={true}
        description={translate(
          'Offering needs to be saved before pricing for dynamic components could be set.',
        )}
      />
    </FormContainer>
  );
};

--- 
+++ 
@@ -1,9 +1,9 @@
 import * as React from 'react';
 
-import { FormContainer, SelectField } from '@waldur/form-react';
+import { FormContainer, SelectField, NumberField } from '@waldur/form-react';
 import { translate } from '@waldur/i18n';
 
-export const OpenStackPluginOptionsForm = ({ container, locale }) => {
+export const OpenStackPluginOptionsForm = ({ container }) => {
   const STORAGE_MODE_OPTIONS = React.useMemo(
     () => [
       {
@@ -17,7 +17,7 @@
         value: 'dynamic',
       },
     ],
-    locale,
+    [],
   );
 
   return (
@@ -32,6 +32,11 @@
           'Offering needs to be saved before pricing for dynamic components could be set.',
         )}
       />
+      <NumberField
+        name="snapshot_size_limit_gb"
+        label={translate('Snapshot size limit')}
+        unit="GB"
+      />
     </FormContainer>
   );
 };
Introduce snapshot size limit as plugin option for OpenStack offering [WAL-2936]
