<commit_before>from django.db import models
from django.contrib import messages
from django.utils import timezone
from apps.storagepool.models import StoragePool
from datetime import timedelta
from binascii import hexlify
import persistent_messages
import os

class Volume(models.Model):
  name = models.CharField(max_length=100, unique=True)
  storagepool = models.ForeignKey(StoragePool)
  capacity = models.BigIntegerField(default=0)
  allocated = models.BigIntegerField(default=0)
  # updated
  updated = models.DateTimeField(auto_now=True)

  def __str__(self):
    return unicode(self).encode('utf-8')

  def __unicode__(self):
    return '%s on %s' % (self.name, self.storagepool)
  
  def get_volume(self):
    pool = self.storagepool.get_storagepool()<commit_msg>Added default of 1GB to Volume capacity.<commit_after>from django.db import models
from django.contrib import messages
from django.utils import timezone
from apps.storagepool.models import StoragePool
from datetime import timedelta
from binascii import hexlify
import persistent_messages
import os

class Volume(models.Model):
  name = models.CharField(max_length=100, unique=True)
  storagepool = models.ForeignKey(StoragePool)
  capacity = models.BigIntegerField(default=1073741824) # 1GB
  allocated = models.BigIntegerField(default=0)
  # updated
  updated = models.DateTimeField(auto_now=True)

  def __str__(self):
    return unicode(self).encode('utf-8')

  def __unicode__(self):
    return '%s on %s' % (self.name, self.storagepool)
  
  def get_volume(self):
    pool = self.storagepool.get_storagepool()
{'fraction_non_alphanumeric': 0.09079445145018916, 'fraction_numerical': 0.014501891551071878, 'mean_word_length': 5.451219512195122, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2602459', 'n_tokens_mistral': 486, 'n_tokens_neox': 463, 'n_words': 122}