<commit_before># -------------------------------------------------------------------------- #
# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org)             #
#                                                                            #
# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
# not use this file except in compliance with the License. You may obtain    #
# a copy of the License at                                                   #
#                                                                            #
# http://www.apache.org/licenses/LICENSE-2.0                                 #
#                                                                            #
# Unless required by applicable law or agreed to in writing, software        #
# distributed under the License is distributed on an "AS IS" BASIS,          #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
# See the License for the specific language governing permissions and        #
# limitations under the License.                                             #
#--------------------------------------------------------------------------- #

require 'OpenNebula'

include OpenNebula

class ImageOCCI < Image
    OCCI_IMAGE = %q{
        <STORAGE href="<%= base_url %>/storage/<%= self.id.to_s  %>">
            <ID><%= self.id.to_s %></ID>
            <NAME><%= self.name %></NAME>
            <% if self['TYPE'] != nil %>
            <TYPE><%= self['TYPE'] %></TYPE>
            <% end %>
            <% if self['TEMPLATE/DESCRIPTION'] != nil %>
            <DESCRIPTION><%= self['TEMPLATE/DESCRIPTION'] %></DESCRIPTION>
            <% end %>
            <SIZE><%= self['SIZE'] %></SIZE>
            <% if self['FSTYPE'] != nil %>
            <FSTYPE><%= self['FSTYPE'] %></FSTYPE>
            <% end %>
            <PUBLIC><%= self['PUBLIC'] == "0" ? "NO" : "YES"%></PUBLIC>
            <PERSISTENT><%= self['PERSISTENT'] == "0" ? "NO" : "YES"%></PERSISTENT>
        </STORAGE>
    }


    ONE_IMAGE = %q{
        NAME = "<%= @image_info['NAME'] %>"
        <% if @image_info['DESCRIPTION'] != nil %>
        DESCRIPTION = "<%= @image_info['DESCRIPTION'] %>"
        <% end %>
        <% if @image_file != nil %><commit_msg>Do not show FSTYPE in OCCI if type OS<commit_after># -------------------------------------------------------------------------- #
# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org)             #
#                                                                            #
# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
# not use this file except in compliance with the License. You may obtain    #
# a copy of the License at                                                   #
#                                                                            #
# http://www.apache.org/licenses/LICENSE-2.0                                 #
#                                                                            #
# Unless required by applicable law or agreed to in writing, software        #
# distributed under the License is distributed on an "AS IS" BASIS,          #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
# See the License for the specific language governing permissions and        #
# limitations under the License.                                             #
#--------------------------------------------------------------------------- #

require 'OpenNebula'

include OpenNebula

class ImageOCCI < Image
    OCCI_IMAGE = %q{
        <STORAGE href="<%= base_url %>/storage/<%= self.id.to_s  %>">
            <ID><%= self.id.to_s %></ID>
            <NAME><%= self.name %></NAME>
            <% if self['TYPE'] != nil %>
            <TYPE><%= self['TYPE'] %></TYPE>
            <% end %>
            <% if self['TEMPLATE/DESCRIPTION'] != nil %>
            <DESCRIPTION><%= self['TEMPLATE/DESCRIPTION'] %></DESCRIPTION>
            <% end %>
            <SIZE><%= self['SIZE'] %></SIZE>
            <% if self['FSTYPE'] != nil and  !self['FSTYPE'].empty? %>
            <FSTYPE><%= self['FSTYPE'] %></FSTYPE>
            <% end %>
            <PUBLIC><%= self['PUBLIC'] == "0" ? "NO" : "YES"%></PUBLIC>
            <PERSISTENT><%= self['PERSISTENT'] == "0" ? "NO" : "YES"%></PERSISTENT>
        </STORAGE>
    }


    ONE_IMAGE = %q{
        NAME = "<%= @image_info['NAME'] %>"
        <% if @image_info['DESCRIPTION'] != nil %>
        DESCRIPTION = "<%= @image_info['DESCRIPTION'] %>"
        <% end %>
        <% if @image_file != nil %>
{'fraction_non_alphanumeric': 0.20142795326698398, 'fraction_numerical': 0.006057983556901774, 'mean_word_length': 1.2109038737446198, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 81, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 26, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1662750', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1133, 'n_words': 316}